Skip to content
Snippets Groups Projects
Commit ac887065 authored by Heine, Eric R's avatar Heine, Eric R
Browse files

Added a simple script to load a different scene when told to

parent e8b6be8f
No related branches found
No related tags found
No related merge requests found
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Shared.SceneLoader {
// A Component that loads a different Scene when told to
public class SceneChanger : MonoBehaviour {
[Tooltip("Which scene to change to")]
[Scene]
public string sceneToLoad;
//---------------------------------------------------------------------------
public void ChangeScene() {
SceneManager.LoadScene(sceneToLoad);
}
}
}
fileFormatVersion: 2
guid: 7bd3bce38f24fa746b7be022aad1dccf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment