Unity 6.3
0 онлайн 77 гостей 3 в системе
Вход

GameObject.scene

Declaration

public SceneManagement.Scene scene;

Описание

Scene, который содержит GameObject.

//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); } }