Exemplo n.º 1
0
        static string ParameterTypeToAccessorName(ParameterType type)
        {
            switch (type)
            {
            case ParameterType.Int: return("Integer");

            default: return(type.ToString());
            }
        }
Exemplo n.º 2
0
        private void AddParameterMenu(object value)
        {
            Undo.RegisterCompleteObjectUndo(this.m_Host.animatorController, "Parameter Added");
            UnityEngine.AnimatorControllerParameterType animatorControllerParameterType = (UnityEngine.AnimatorControllerParameterType)((int)value);
            string name = "New " + animatorControllerParameterType.ToString();

            this.m_Host.animatorController.AddParameter(name, animatorControllerParameterType);
            this.RebuildList();
            this.m_ParameterList.index = this.m_Tree.Length - 1;
            if (this.renameOverlay.IsRenaming())
            {
                this.RenameEnd();
            }
            this.renameOverlay.BeginRename(this.m_Host.animatorController.parameters[this.m_ParameterList.index].name, this.m_ParameterList.index, 0.1f);
        }