예제 #1
0
 public void OnValidate()
 {
     JuniperSystem.OnEditorUpdateIn(
         $"{typeof(MasterSceneController).FullName}::{nameof(SetBuildSettings)}",
         TimeSpan.FromSeconds(1),
         SetBuildSettings);
 }
예제 #2
0
 private void LoadScenes_MenuItem()
 {
     JuniperSystem.EnsureFactory();
     using (var prog = new UnityEditorProgressDialog("Loading scenes"))
     {
         this.Run(LoadAllScenesCoroutine(prog));
     }
 }
예제 #3
0
        private Task Stopper(Action <IProgress> actor, IProgress prog)
        {
            var onStoppedCompleter = new TaskCompletionSource <bool>();

            void stopper(object _, EventArgs __)
            {
                Stopped -= stopper;
                onStoppedCompleter.SetResult(true);
            }

            Stopped += stopper;
            JuniperSystem.OnMainThread(() => actor(prog));
            return(onStoppedCompleter.Task);
        }
예제 #4
0
        private static void InstallJuniper()
        {
            UninstallJuniper();

            if (!Find.Any(out JuniperSystem platform))
            {
                platform = new GameObject("UserRig").Ensure <JuniperSystem>();
            }
            platform.tag = "Player";

            JuniperSystem.InstallSystem(true);

            global::UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(
                UnityEngine.SceneManagement.SceneManager.GetSceneAt(0));
        }
예제 #5
0
 private static void UninstallJuniper()
 {
     JuniperSystem.UninstallSystem();
 }