Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SceneSwitch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
unity
SceneSwitch
Commits
2d7fefb0
Commit
2d7fefb0
authored
4 years ago
by
David Huss
Browse files
Options
Downloads
Patches
Plain Diff
Add Readme
parent
c0b1841a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Assets/SceneSwitch.cs.old
+0
-21
0 additions, 21 deletions
Assets/SceneSwitch.cs.old
Assets/SceneSwitch.cs.old.meta
+0
-7
0 additions, 7 deletions
Assets/SceneSwitch.cs.old.meta
README.md
+8
-0
8 additions, 0 deletions
README.md
with
8 additions
and
28 deletions
Assets/SceneSwitch.cs.old
deleted
100644 → 0
+
0
−
21
View file @
c0b1841a
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);
}
}
This diff is collapsed.
Click to expand it.
Assets/SceneSwitch.cs.old.meta
deleted
100644 → 0
+
0
−
7
View file @
c0b1841a
fileFormatVersion: 2
guid: 94f9b5d9912a72f1ea86ad52ec99056d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
8
−
0
View file @
2d7fefb0
# 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment