Find() private method

private Find ( string name ) : string
name string
return string
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();
        }
        protected void ApplyTemplate()
        {
            Undo.RegisterCompleteObjectUndo(this, "Apply Template");

            HumanTemplate humanTemplate = OpenHumanTemplate();

            if (humanTemplate == null)
            {
                return;
            }

            for (int i = 0; i < m_Bones.Length; i++)
            {
                string boneName = humanTemplate.Find(m_Bones[i].humanBoneName);
                if (boneName.Length > 0)
                {
                    Transform transform = modelBones.Keys.FirstOrDefault(f => AvatarMappingEditor.MatchName(f.name, boneName));
                    m_Bones[i].bone = transform;
                }
                else
                {
                    m_Bones[i].bone = null;
                }
                m_Bones[i].Serialize(m_HumanBoneArray);
            }

            ValidateMapping();
            SceneView.RepaintAll();
        }
Exemplo n.º 3
0
        protected void ApplyTemplate()
        {
            Undo.RegisterCompleteObjectUndo((UnityEngine.Object) this, "Apply Template");
            HumanTemplate humanTemplate = this.OpenHumanTemplate();

            if ((UnityEngine.Object)humanTemplate == (UnityEngine.Object)null)
            {
                return;
            }
            for (int index = 0; index < this.m_Bones.Length; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                AvatarMappingEditor.\u003CApplyTemplate\u003Ec__AnonStorey9E templateCAnonStorey9E = new AvatarMappingEditor.\u003CApplyTemplate\u003Ec__AnonStorey9E();
                // ISSUE: reference to a compiler-generated field
                templateCAnonStorey9E.boneName = humanTemplate.Find(this.m_Bones[index].humanBoneName);
                // ISSUE: reference to a compiler-generated field
                if (templateCAnonStorey9E.boneName.Length > 0)
                {
                    // ISSUE: reference to a compiler-generated method
                    Transform transform = this.modelBones.Keys.FirstOrDefault <Transform>(new Func <Transform, bool>(templateCAnonStorey9E.\u003C\u003Em__1CB));
                    this.m_Bones[index].bone = transform;
                }
                else
                {
                    this.m_Bones[index].bone = (Transform)null;
                }
                this.m_Bones[index].Serialize(this.serializedObject);
            }
            this.ValidateMapping();
            SceneView.RepaintAll();
        }