PlayOnAwake Audiosource will only play when it's set to loop? bug?

I’ve been searching the forums, and asking some questions, but no one has been able to help me.


I have a situation that is perplexing. I have used this same method several times and it’s not a complex setup, but it simply won’t work in this specific scenario, and I can’t pinpoint the reason.

I have a prefab of a gate, it has an audio source in a disabled game object in its hierarchy.This audio source game object is enabled via an animation when the player walks close to the gate.
_
The object is set up like this:
alt text

The system works as expected, when the character walks to the door it plays the animation, and it opens or closes the gate accordingly. HOWEVER, the audio will NOT play, even though the audiosource is set as “play on awake” and the gameObject IS being enabled in the editor.
All other audio in the game works fine, and even other audio triggered in similar ways work too.
_
The audio in the prefab is set up like this:
alt text
Weirdly, I found out that if I do set the audiosource to “LOOP” as shown on the image above, the audio DOES play, but I don’t want this sound to be looping. No matter what audio clip is set, it will not play when not looped.

I have tried with an intermediary script triggered from an animation event as well, but although the method is also triggered, the audio source will not play, no matter what. I’ve set the volume and the range of the audiosource to be exaggeratedly large, to test, but nothing.

As I said, with the script, the functions are also triggering as expected, debug shows calls to the audiosource.Play() function too, and It shows in inspector as well.

I am at a loss as to what could be causing this.


I recently updated to unity 2019.1.9f1, but I’m not sure if this is a documented issue.
Is this a bug? does anyone have any idea as to why it could be failing?
Thanks.

After several restarts both PC and Unity, and even a unity re-installation, the issue seems to have resolved itself.

Not sure what did it.

Thanks anyhow.