コード例 #1
0
        static void Init()
        {
            // Get existing open window or if none, make a new one:
            ThreadTestWindow window = (ThreadTestWindow)EditorWindow.GetWindow(typeof(ThreadTestWindow));

            window.Show();
        }
コード例 #2
0
        private void test(Action OnComplete)
        {
            string result = null;

            ThreadTestWindow.Instance().Enqueue(() =>
            {
                OptionsWizard optionsWizard =
                    OptionsWizard.CreateWizard("Class cannot be found, select which one to choose",
                                               "a", new string[] { "aa", "b", "c" },
                                               resultCompleted => { Debug.Log("Select called, result: " + resultCompleted); },
                                               () => { Debug.Log("Ignore called"); });
            });

            while (string.IsNullOrEmpty(result))
            {
                Debug.Log("result : " + result);
                Thread.Sleep(1000);
            }

            Debug.Log("result : " + result);
            Debug.Log("Completed");
            OnComplete();
        }