- Home /
How to find out which scene an gameobject belongs to?
Hi, I have one question. When I edit multi-scenes with Unity5.3, how can I get the SceneName that an gameobject belongs to?
For example, how can I get the SceneName "Test02" that the Capsule belongs?

Answer by Brokenarrow · Dec 09, 2015 at 01:44 PM
At runtime you can get your scenename with:
Debug.Log(Application.loadedLevelName);.
Is that what you mean?
If you read the body of the Q, this is about using the Editor (not during play) on a new feature in 5.3 for multi-scenes.
I'm assu$$anonymous$$g the issue is you might select an object in multi-scene-edit from the game world. $$anonymous$$aybe you can't see it in the Hierarchy panel right away, so it would be nice if the Inspector showed you the scene it came from.
Disclaimer: I've never heard of multi-scene-edit. It might be made up for all I know.
Answer by Zimbres · Jul 12, 2016 at 01:18 PM
From the docs: You can get the scene a GameObject belongs to through GameObject.scene and you can move a GameObject to the root of a scene using SceneManager.MoveGameObjectToScene.
Your answer