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?

59594-img151209.png

Well, I haven’t tested it myself, but looking at the docs, I would say that GameObject.scene is the way to go :stuck_out_tongue: The returned scene should have a name property.

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.

At runtime you can get your scenename with:

Debug.Log(Application.loadedLevelName);.

Is that what you mean?