How do I know which one is the best to use in my case and why? I did some research but it still not very clear to me, they all seem to be ok to use in different situations. If anyone know a good article or something about this topic would be very useful too!

The FFT gets a subset of samples (a number of consecutive audio samples) and calculates how much of each harmonic is present in that subset. But the FFT “thinks” that all samples outside the subset are 0, which seems like a big rectangular pulse (as wide as the number of samples) multiplied by the signal, and the harmonics of such “pulse” are mixed with the audio signal.

The windowing function is a trick that greatly reduces these spurious harmonics: the samples are multiplied by special factors that vary along the window, and the resulting FFT gets much cleaner. Since these factors are calculated on-the-fly, a more complex windowing function can slow down the FFT - that’s why Unity allows selection of the window type.

Rectangular means no correction window at all, which’s fast but dirty. Triangle is a triangular window, cleans reasonably the FFT at very low cost. Hamming, Hanning, Blackman and BlackmanHarris windows are progressively more slower and cleaner alternatives (evaluating COS is usually a slow operation).

If you’re going to use the FFT for precise operations like evaluating the pitch of a given sound, select the more complex windows - Blackman or BlackmanHarris. For less stringent operations like spectrum displays, evaluation of audio ranges (treble, bass, mid etc.) and other applications where precision is not required, try triangle, Hamming or Hanning windows (even the rectangular window may be good enough in many cases).