Tanoda
pb_OpenSceneButton.cs
Go to the documentation of this file.
1
using
System;
2
using
UnityEngine
;
3
using
System.Collections;
4
#if !UNITY_5_2
5
using
UnityEngine
.SceneManagement;
6
#endif
7
8
namespace
GILES
9
{
13
public
class
pb_OpenSceneButton
:
pb_ToolbarButton
14
{
15
public
string
scene
;
16
17
public
override
string
tooltip
{
get
{
return
Macro
.
T
(
"BTN_EXIT"
); } }
18
19
public
void
OpenScene
()
20
{
21
try
22
{
23
GameObject.Find(
"EpilepsyFixer"
).SetActive(
true
);
24
}
25
catch
(Exception)
26
{
27
// ignored
28
}
29
#if !UNITY_WEBGL
30
Destroy(Valve.VR.InteractionSystem.Player.instance);
31
Destroy(FindObjectOfType<PreventDestroy>());
32
#if !DANA
33
Destroy(GameObject.Find(
"CurrentUser"
));
34
Destroy(GameObject.Find(
"SavedUser Singleton"
));
35
#endif
36
Destroy(GameObject.Find(
"NetworkManager"
));
37
Destroy(GameObject.Find(
"[ChaperoneInfo]"
));
38
Destroy(GameObject.Find(
"pb_AssetBundles Singleton"
));
39
#endif
40
Destroy(GameObject.Find(
"Player"
));
41
#if UNITY_5_2
42
Application.LoadLevel(
scene
);
43
#else
44
45
HashingManager
.
instance
.ClearHashTable();
46
SceneManager.LoadScene(
scene
);
47
#endif
48
}
49
}
50
}
GILES.pb_MonoBehaviourSingleton.instance
static T instance
Definition:
pb_MonoBehaviourSingleton.cs:28
GILES.pb_OpenSceneButton
Definition:
pb_OpenSceneButton.cs:14
GILES.pb_OpenSceneButton.tooltip
override string tooltip
Definition:
pb_OpenSceneButton.cs:17
GILES.pb_OpenSceneButton.scene
string scene
Definition:
pb_OpenSceneButton.cs:15
GILES.pb_OpenSceneButton.OpenScene
void OpenScene()
Definition:
pb_OpenSceneButton.cs:19
GILES.pb_ToolbarButton
Definition:
pb_ToolbarButton.cs:13
HashingManager
Definition:
Alap/HashingManager.cs:10
Macro
Definition:
Macro.cs:12
Macro.T
static string T(string key)
Definition:
Macro.cs:19
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Scripts
GUI
Toolbar
pb_OpenSceneButton.cs
Generated by
1.9.3