I’m making a game with lots of additive scene loading. When I have a scene loaded, I can’t seem to find a way to get the scenefile-name from a Component (MonoBehaviour) on a GameObject in it. Is that possible?
I can’t use SceneManager.GetActiveScene() because the Component that asks is not necessarily in the active scene.
I would prefer a solution, that works both when playing the game in UnitiyEditor and in builds. If that’s not possible, a solution for playing the game in UnityEditor is most important. Runtime I can keep track of what’s loaded somehow.
Any input would be most valued!