File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Editor/TypescriptServices Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ namespace Airship.Editor {
88 [ InitializeOnLoad ]
99 public class TypescriptStatusbar {
1010 static TypescriptStatusbar ( ) {
11-
12-
11+ #if AIRSHIP_PLAYER
12+ return ;
13+ #endif
14+ if ( ! TypescriptServices . IsValidEditor ) return ;
1315 EditorApplication . delayCall += MountStatusbar ;
1416 }
1517
Original file line number Diff line number Diff line change 11#if UNITY_EDITOR
2+ using System ;
23using System . Collections ;
4+ using System . Linq ;
35using Editor ;
46using Editor . EditorInternal ;
57using Editor . Packages ;
@@ -24,13 +26,21 @@ public void Modify() {
2426 /// Main static class for handling the TypeScript services
2527 /// </summary>
2628 public static class TypescriptServices {
29+ /// <summary>
30+ /// Returns true if this is a valid editor window to run TSS in
31+ /// </summary>
32+ public static bool IsValidEditor =>
33+ ! ClonesManager . IsClone ( ) &&
34+ ! Environment . GetCommandLineArgs ( ) . Contains ( "--virtual-project-clone" ) ;
35+
2736 [ InitializeOnLoadMethod ]
2837 public static void OnLoad ( ) {
29- var tags = CurrentPlayer . ReadOnlyTags ( ) ;
30- var isCloneOrMPPM = tags . Length > 0 || ClonesManager . IsClone ( ) ;
31-
38+ #if AIRSHIP_PLAYER
39+ Debug . LogWarning ( "[TypescriptServices] Skipped, in Airship Player mode" ) ;
40+ return ;
41+ #endif
3242 // If a server or clone - ignore
33- if ( isCloneOrMPPM ) return ;
43+ if ( ! IsValidEditor ) return ;
3444 EditorApplication . delayCall += OnLoadDeferred ;
3545
3646 EditorApplication . playModeStateChanged += PlayModeStateChanged ;
You can’t perform that action at this time.
0 commit comments