UnityEditor.HumanTemplate.Find C# (CSharp) Method

Find() private method

private Find ( string name ) : string
name string
return string
        public extern string Find(string name);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

Exemplo n.º 1
0
        protected void ApplyTemplate()
        {
            Undo.RegisterCompleteObjectUndo(this, "Apply Template");
            HumanTemplate humanTemplate = this.OpenHumanTemplate();

            if (humanTemplate == null)
            {
                return;
            }
            for (int i = 0; i < this.m_Bones.Length; i++)
            {
                string boneName = humanTemplate.Find(this.m_Bones[i].humanBoneName);
                if (boneName.Length > 0)
                {
                    Transform bone = base.modelBones.Keys.FirstOrDefault((Transform f) => AvatarMappingEditor.MatchName(f.name, boneName));
                    this.m_Bones[i].bone = bone;
                }
                else
                {
                    this.m_Bones[i].bone = null;
                }
                this.m_Bones[i].Serialize(base.serializedObject);
            }
            this.ValidateMapping();
            SceneView.RepaintAll();
        }
All Usage Examples Of UnityEditor.HumanTemplate::Find