Search Results for

    Show / Hide Table of Contents

    Scene Reference

    img5.png

    The Scene System supports Scene Reference.

    The Scene System provides two ways to install a Scene Reference:

    • Installation using the Scene System Wizard
    • Installation using Git UPM

    Installation using the Scene System Wizard

    img4.png

    Open Tools > Scene System > Scene System Wizard.

    Using the Scene System Wizard, you can install the Scene Reference along with the Scene System.

    Warning

    The internal implementation uses Git UPM for installation, so Git is required.

    Installation using Git UPM

    https://github.com/NK-Studio/SceneReference.git#UPM
    

    Open Window > Package Manager > + > Add package from git URL...
    Enter the above address in the input box and click the Add button to complete the installation.

    Example Code

    using UnityEngine;
    using UnityEngine.SceneSystem;
    
    public class Example : MonoBehaviour
    {
        public SceneReference nextScene;
    
        private void Start()
        {
            // Load the scene.
            Scenes.LoadSceneAsync(nextScene);
            
            // Get the path of the scene.
            Debug.Log(nextScene.Path);
        }
    }
    
    • Improve this Doc
    In This Article
    Back to top Copyright © 2024 NK Studio
    Generated by DocFX on 6 January 2024