private void OnGUI_TaskListSelector()
        {
#if UNITY_EDITOR
            var taskList = GUIBTScript.taskList;
            UnityEditor.EditorGUI.BeginChangeCheck();
            taskIndex = UnityEditor.EditorGUILayout.Popup(taskIndex, taskList, GUILayout.ExpandWidth(false), GUILayout.MaxWidth(80.0f));
            if (UnityEditor.EditorGUI.EndChangeCheck())
            {
                if (taskIndex >= GUIBTScript.structuralNodes.Length)
                {
                    var ti = GUIBTScript.taskImplementations[taskIndex - GUIBTScript.structuralNodes.Length];
                    this.Promote(ti);
                }
                else
                {
                    var option    = taskList[taskIndex];
                    var lastSlash = option.LastIndexOf('/');
                    var w         = option.Length - lastSlash - 1;
                    var name      = option.Substring(lastSlash + 1, w);

                    string        label = null;
                    System.Type[] types = null;
                    if (name == "tree")
                    {
                        label = "tree"; types = new System.Type[] { typeof(string) };
                    }
                    else
                    if (name == "repeat n")
                    {
                        label = "repeat"; types = new System.Type[] { typeof(int) };
                    }
                    else
                    {
                        label = name; types = new System.Type[0];
                    }
                    this.Promote(label, types);
                }
                GUIBTScript.SetSourcesDirty();
            }
#endif
        }
 void OnParameterChange()
 {
     GUIBTScript.SetSourcesDirty();
 }