Hi,
ActionSceneAdd seems to not correctly remove the scene load/unload event hooks in case the scene has already been loaded.
My Setup
When I enter play mode a second time without triggering a domain reload I get a "Could not find SubScene class for scene .." warning coming from ActionSceneAdd.cs:217
From the code this seems to happen because RemoveEventHooks is only called at the bottom of the Run function but "return UpdateSceneByName() / UpdateSceneByNumber()" could also return 0 e.g. when the scene is already opened because sceneChanger.AddSubScene returns false which causes run to never run again thus not calling RemoveEventHooks.
Due to how my current setup works it only causes a warning to be logged on game start but it seems that you could construct a situation where this would trigger PlayStartCutscene while loading a completely different scene if I read the code correctly.
Conditions that trigger this bug:
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @billykater.
Thanks very much for the report and detailed breakdown. I will investigate this issue,