UIButtonSceneSwitcher#
- NAMESPACE:
UnityUtils.ScriptUtils.UI
Usage#
Add a ‘UIButtonSceneSwitcher’ script to a UI button and it will load the scene based on your inputs.
Warning
Make sure only 1 of the provided scene loading variables is not null/default, the script will break otherwise.
Functions#
- UnityUtils.ScriptUtils.UI.UIButtonSceneSwitcher : MonoBehaviour , IPointerClickHandler
Public Members
-
string sceneName = ""#
If this value is not empty, it will load the scene on click using the sceneName.
-
int buildIndex = -1#
If this value is not -1 (Default value), it will load the scene using the buildIndex.
-
LoadSceneMode sceneMode#
The LoadSceneMode to use when loading the scene.
-
bool logSwitch#
If true, will do a Debug.Log when switching scenes.
-
string sceneName = ""#