File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Assets/CesiumForUnitySamples Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 1818[ InitializeOnLoad ]
1919static class CesiumSamplesSceneManager
2020{
21- static readonly string samplesKey = "OpenedCesiumSamples" ;
22-
2321 static CesiumSamplesSceneManager ( )
2422 {
2523 DisableTextMeshProIcons ( ) ;
2624
2725 EditorSceneManager . sceneOpened += ResetSceneViewCamera ;
28- EditorApplication . update += OpenFirstSampleScene ;
29- EditorApplication . quitting += RemoveSamplesKeyFromPlayerPrefs ;
3026 }
3127
3228 // There's no public API to disable component icons in the SceneView, which
@@ -65,26 +61,6 @@ static void DisableTextMeshProIcons()
6561 }
6662 }
6763
68- // Unity will not open the first sample scene on its own, so this manually opens
69- // the sample scene when the Editor is first opened. The PlayerPref prevents
70- // the first scene from being re-opened whenever the user's code compiles.
71- static void OpenFirstSampleScene ( )
72- {
73- EditorApplication . update -= OpenFirstSampleScene ;
74- if ( PlayerPrefs . GetInt ( samplesKey , - 1 ) > 0 )
75- {
76- return ;
77- }
78-
79- PlayerPrefs . SetInt ( samplesKey , 1 ) ;
80- EditorSceneManager . OpenScene ( "Assets/Scenes/01_CesiumWorld.unity" ) ;
81- }
82-
83- static void RemoveSamplesKeyFromPlayerPrefs ( )
84- {
85- PlayerPrefs . DeleteKey ( samplesKey ) ;
86- }
87-
8864 static void ResetSceneViewCamera ( Scene scene , OpenSceneMode mode )
8965 {
9066 GameObject [ ] gameObjects = scene . GetRootGameObjects ( ) ;
You can’t perform that action at this time.
0 commit comments