Okay so i want t know if there's a difference between AudioSource.Play() and

My approach was simply enabling the AudioSource component using

audioSource.enabled = true;

whenever the space key is pressed and letting it “Play On Awake” then disabling it again whenever the current input isn’t KeyCode.Space in other word the “Else” part.

it worked exactly the same audio wise but does this differ at all performance wise??

Hi Eloi,

Unfortunately, I cannot answer your question because I’ve never compared enabled with Play On Awake with the Play or the UnPause method. If you need to know the difference, check the Profiler. Also please feel free to ask our helpful community of students for advice in our official Discord chat.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms