예제 #1
0
        public static void Init()
        {
            ASEStartScreen window = (ASEStartScreen)GetWindow(typeof(ASEStartScreen), true, "Amplify Shader Editor Start Screen");

            window.minSize = new Vector2(650, 500);
            window.maxSize = new Vector2(650, 500);
            window.Show();
        }
예제 #2
0
        static void Update()
        {
            EditorApplication.update -= Update;

            if (!EditorApplication.isPlayingOrWillChangePlaymode)
            {
                Preferences.ShowOption show = Preferences.ShowOption.Never;
                if (!EditorPrefs.HasKey(Preferences.PrefStartUp))
                {
                    show = Preferences.ShowOption.Always;
                    EditorPrefs.SetInt(Preferences.PrefStartUp, 0);
                }
                else
                {
                    if (Time.realtimeSinceStartup < 10)
                    {
                        show = (Preferences.ShowOption)EditorPrefs.GetInt(Preferences.PrefStartUp, 0);
                        // check version here
                        if (show == Preferences.ShowOption.OnNewVersion)
                        {
                            ASEStartScreen.StartBackgroundTask(StartRequest(ASEStartScreen.ChangelogURL, () =>
                            {
                                var changeLog = ChangeLogInfo.CreateFromJSON(www.downloadHandler.text);
                                if (changeLog != null)
                                {
                                    if (changeLog.Version > VersionInfo.FullNumber)
                                    {
                                        ASEStartScreen.Init();
                                    }
                                }
                            }));
                        }
                    }
                }

                if (show == Preferences.ShowOption.Always)
                {
                    ASEStartScreen.Init();
                }
            }
        }
예제 #3
0
        static void Update()
        {
            EditorApplication.update -= Update;

            if (!EditorApplication.isPlayingOrWillChangePlaymode)
            {
                bool show = false;
                if (!EditorPrefs.HasKey("ASELastSession"))
                {
                    show = true;
                    EditorPrefs.SetBool("ASELastSession", true);
                }
                else
                {
                    if (Time.realtimeSinceStartup < 10)
                    {
                        show = EditorPrefs.GetBool("ASELastSession", true);
                        // check version here
                        if (!show)
                        {
                            ASEStartScreen.StartBackgroundTask(StartRequest(ASEStartScreen.ChangelogURL, () =>
                            {
                                var changeLog = ChangeLogInfo.CreateFromJSON(www.downloadHandler.text);
                                if (changeLog != null)
                                {
                                    if (changeLog.Version > VersionInfo.FullNumber)
                                    {
                                        ASEStartScreen.Init();
                                    }
                                }
                            }));
                        }
                    }
                }

                if (show)
                {
                    ASEStartScreen.Init();
                }
            }
        }