ドキュメント

Unity Engine

Download Unity

Unity Engine

scene

The Scene that contains the GameObject.
読み終わるまでの所要時間 1 分最終更新 7時間前

Definition

public Scene scene { get; }

Examples

//Output the name of the Scene this GameObject belongs tousing UnityEngine;using UnityEngine.SceneManagement;public class Example : MonoBehaviour{ void Start() { Scene scene = gameObject.scene; Debug.Log(gameObject.name + " is from the Scene: " + scene.name); }}