Hi there,
I am encountering the weirdest issue, that I will try to break down in the easiest way possible.
My game is a one scene only. Many objects in this scene, all with different components in them. The game runs fine in editor, compiles just fine as well.
When I run the game (regardless of the platform), everything is perfect, except that, when the player dies I use SceneManager.LoadScene() to reload the current scene.
However, while level loading works fine, I suddenly gets my audio source on one of my object to throw a missing reference (component destroyed) when I try to access it in my script ( as = GetComponent() ).
I checked in the editor after reloading my scene and the audio source is definitely there.
If I quit the game completely and re-launch, everything is fine again.
I tried my ways of tricking the engine to re-load completely (for example, I load a n empty scene which purpose is to load the main scene again) to no avail.
Note that this is happening in the editor AND on the final build.
Anyone already encountered these? I assume there is a memory issue.