/SceneReference

Unity3D script, that allows assigning serializable references to scenes in inspector.

Primary LanguageC#OtherNOASSERTION

SceneReference.cs for Unity3D

Unity3D script, that allows assigning serializable references to scenes in inspector.
Works in editor and in build.
Based on https://github.com/starikcetin/unity-scene-reference

Instalation

Install as git package,
or just drop SceneReference.cs anywhere in your "Assets" folder.

Usage

  1. Add using Tymski;
  2. Make a field in your script
    public SceneReference scene; 
  1. In inspector, reference your scene
    Scene field

  2. Load your scene

    SceneManagement.SceneManager.LoadScene(scene);