Objects don't instantiate after level reload.
I'm having some trouble instantiating prefabs after I reloaded a level. I haven't got any errors in the console so I really don't have any clue what the problem is here. I've spend the whole day searching for a solution but I can't find one yet.
I'm instantiating some kind of way point indicator with a counter on it. After 3 seconds the objects get deleted by the script that is on the instantiated prefab. Everything works fine until I reload the level. After that for some reason Unity won't instantiate the waypoint prefab object. I tried different ways of reloading the level like using an AsyncOperation and UnityEngine.SceneManagement. I tried switching to a different scene and unloading the old one but non of these things seem to change the behavior. I also tried moving the script that is attached to the prefab to an object that doesn't get deleted all the time. I also tried using DontDestroyOnLoad (this); but that also didn't change a thing.
Does any one have a clue why Unity won't instantiate objects anymore after a reload?
Async operations are not necessary here. Scene $$anonymous$$anagement is just the new class for scene handling.
what you need to do is only one gameobject in that scene with the instantiate part, ran in start or awake. don't use statics anywhere. the prefabs only need the destroy stuff.
If it works once, it works on every scene load. usually you have to code against that I'd you want a different behaviour.