示例#1
0
 public override void InitializeAutoComplete()
 {
     ObjectsPerName.Clear();
     for (int i = 0; i < SceneManager.sceneCount; i++)
     {
         ObjectsPerName.Add(SceneManager.GetSceneAt(i).name, SceneManager.GetSceneAt(i));
     }
     base.InitializeAutoComplete();
 }
示例#2
0
 public override void InitializeAutoComplete()
 {
     ObjectsPerName.Clear();
     foreach (string tag in UnityEditorInternal.InternalEditorUtility.tags)
     {
         ObjectsPerName.Add(tag, tag);
     }
     base.InitializeAutoComplete();
 }
示例#3
0
 public override void InitializeAutoComplete()
 {
     ObjectsPerName.Clear();
     for (int i = 0; i <= 31; i++)
     {
         string layerName = LayerMask.LayerToName(i);
         if (layerName.Length > 0)
         {
             ObjectsPerName.Add(layerName, i);
         }
     }
     base.InitializeAutoComplete();
 }
示例#4
0
        public virtual CommandParameterAutoComplete <T> AddValue(string alias, T value)
        {
            if (!ObjectsPerName.ContainsKey(alias))
            {
                ObjectsPerName.Add(alias, value);
            }
            else
            {
                ObjectsPerName[alias] = value;
            }

            return(this);
        }
示例#5
0
        public override void InitializeAutoComplete()
        {
            if (!ParameterType.IsEnum)
            {
                return;
            }

            ObjectsPerName.Clear();

            foreach (var en in Enum.GetValues(ParameterType))
            {
                string name = Enum.GetName(ParameterType, en);

                if (name != null)
                {
                    ObjectsPerName.Add(name.NicifyVariableName(), en);
                }
            }

            base.InitializeAutoComplete();
        }