Hi
I have a loading scene which has some basic loading animations (in my case some spinning balls). The spinning is handled by a coroutine which changes the sprites every x seconds to get an old school rotation effect.
Whilst this works if I play the loading scene in the editor, when instantiated by AC at Runtime the coroutines don't work and I wonder whether there is a StopAllCoroutines call being run by the scene loader. There appears to be one in one of the fade functions in AC.
If that is the case, what's the right way to determine whether the loading scene is now visible and is allowed to start its own coroutines? There's a eventmanager.OnAfterChangeScene() which might be suitable if I can tell whether it has loaded the Loading scene.
Any thoughts on this?
Olly
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Going by Unity's docs, StopAllCoroutines ought to only affect the script it's within:
https://docs.unity3d.com/ScriptReference/MonoBehaviour.StopAllCoroutines.html
The behaviour you're seeing may be something else.
A script to change the sprite over time shouldn't be necessary, though. An Animator with a single AnimationClip, which animates a Sprite Renderer, should be able to do this automatically when the scene begins.
If you switch over to the use of Animator, does it play properly in the build?
.