![]() ![]() Because your script has DontDestroyOnLoad (which you don't need to put in Start because you already have it in Awake), it will be carried over to any new scene that you load, and it will not be loaded again, so Awake will not be called again. ![]() The Awake method is only called when a script is first loaded. the Awake method starts a coroutine, but when reseting the scene it doesn't even run it. SceneManager.LoadSceneAsync("gameplayScene 1") SceneManager.LoadScene("gameplayScene 1") Public class LoadingSceneController : MonoBehaviour Here's the script of the unitary test: using UnityEngine I made an unitary test trying to restart a scene with just one object and one script attached, on its Start method it also starts a coroutine but even in that test it doesn't even run the coroutine. I don't use any static variables on any script. ![]() I've read that it may be a problem of using the DontDestroyOnLoad method, but that doesn't seem to solve the problem since that script on the start takes a lot of references of objects that are only on the scene that I want to restart. ![]() It doesn't seem to run, I have a script (of all scripts that have Awake and Start methods on that scene) that on the Awake method starts a coroutine, but when reseting the scene it doesn't even run it. I have a problem when I try to reset a scene. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |