Exemplo n.º 1
0
        public void OnSettingsUI(UIHelperBase helper)
        {
            try {
                UIHelper group = helper.AddGroup(Name) as UIHelper;
                UIPanel  panel = group.self as UIPanel;

                panel.gameObject.AddComponent <OptionsKeymapping>();

                group.AddSpace(10);

                F5toExec.Draw(group);
                SyncExecution.Draw(group, (b) => {
                    PythonConsole.CreateInstance();
                });
                ShowRemoteConsole.Draw(group);
                DoNotLaunchRemoteConsole.Draw(group);

                group.AddSpace(10);

                group.AddButton("Kill python engine", () => {
                    PythonConsole.KillInstance();
                });
            }
            catch (Exception e) {
                Debug.Log("OnSettingsUI failed");
                Debug.LogException(e);
            }
        }
Exemplo n.º 2
0
        public void OnLevelUnloading()
        {
            try {
                UnityPythonObject.Instance.scriptEditor.Visible = false;
            } catch { }

            /*var go = UnityEngine.Object.FindObjectOfType<SelectionToolControl>();
             * if (go != null) {
             *  UnityEngine.Object.Destroy(go);
             * }*/
            PythonConsole.KillInstance();
        }