Skip to content
Snippets Groups Projects
Commit 2d7fefb0 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Add Readme

parent c0b1841a
No related branches found
No related tags found
No related merge requests found
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneSwitch : MonoBehaviour {
public string SceneName = "";
public void Switch(Collider collider)
{
SceneManager.LoadScene(SceneName, LoadSceneMode.Single);
Debug.LogFormat("Switching to Scene {0}", SceneName);
}
public void Add()
{
SceneManager.LoadScene(SceneName, LoadSceneMode.Additive);
Debug.LogFormat("Adding Scene {0}", SceneName);
}
}
fileFormatVersion: 2
guid: 94f9b5d9912a72f1ea86ad52ec99056d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
# SceneSwitch
Allows you to switch the active Scene when a Triggervolume is entered, exited or when you stay in a trigger volume for long enough
1. Copy the Script `Assets/SceneSwitch.cs` to your assets folder
2. Drag it onto the Trigger Volume
3. Enter a Scene Name (for the target Scene)
4. Select a mode (On Enter, On Exit, Countdown)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment