Version: 2020.1
언어: 한국어
public SceneManagement.Scene scene ;

설명

Scene that the GameObject is part of.

//Output the name of the Scene this GameObject belongs to

using UnityEngine; using UnityEngine.SceneManagement;

public class Example : MonoBehaviour { void Start() { Scene scene = gameObject.scene; Debug.Log(gameObject.name + " is from the Scene: " + scene.name); } }