Ejemplo n.º 1
0
        private bool TransformChanged(Transform tr)
        {
            SerializedProperty serializedProperty = AvatarSetupTool.FindSkeletonBone(base.serializedObject, tr, false, false);
            bool result;

            if (serializedProperty != null)
            {
                SerializedProperty serializedProperty2 = serializedProperty.FindPropertyRelative(AvatarSetupTool.sPosition);
                if (serializedProperty2 != null && serializedProperty2.vector3Value != tr.localPosition)
                {
                    result = true;
                    return(result);
                }
                SerializedProperty serializedProperty3 = serializedProperty.FindPropertyRelative(AvatarSetupTool.sRotation);
                if (serializedProperty3 != null && serializedProperty3.quaternionValue != tr.localRotation)
                {
                    result = true;
                    return(result);
                }
                SerializedProperty serializedProperty4 = serializedProperty.FindPropertyRelative(AvatarSetupTool.sScale);
                if (serializedProperty4 != null && serializedProperty4.vector3Value != tr.localScale)
                {
                    result = true;
                    return(result);
                }
            }
            result = false;
            return(result);
        }
        bool TransformChanged(Transform tr)
        {
            SerializedProperty bone = AvatarSetupTool.FindSkeletonBone(serializedObject, tr, false, false);

            if (bone != null)
            {
                SerializedProperty positionP = bone.FindPropertyRelative(AvatarSetupTool.sPosition);
                if (positionP != null && positionP.vector3Value != tr.localPosition)
                {
                    return(true);
                }

                SerializedProperty rotationP = bone.FindPropertyRelative(AvatarSetupTool.sRotation);
                if (rotationP != null && rotationP.quaternionValue != tr.localRotation)
                {
                    return(true);
                }

                SerializedProperty scaleP = bone.FindPropertyRelative(AvatarSetupTool.sScale);
                if (scaleP != null && scaleP.vector3Value != tr.localScale)
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 3
0
        private bool TransformChanged(Transform tr)
        {
            SerializedProperty skeletonBone = AvatarSetupTool.FindSkeletonBone(this.serializedObject, tr, false, false);

            if (skeletonBone != null)
            {
                SerializedProperty propertyRelative1 = skeletonBone.FindPropertyRelative(AvatarSetupTool.sPosition);
                if (propertyRelative1 != null && propertyRelative1.vector3Value != tr.localPosition)
                {
                    return(true);
                }
                SerializedProperty propertyRelative2 = skeletonBone.FindPropertyRelative(AvatarSetupTool.sRotation);
                if (propertyRelative2 != null && propertyRelative2.quaternionValue != tr.localRotation)
                {
                    return(true);
                }
                SerializedProperty propertyRelative3 = skeletonBone.FindPropertyRelative(AvatarSetupTool.sScale);
                if (propertyRelative3 != null && propertyRelative3.vector3Value != tr.localScale)
                {
                    return(true);
                }
            }
            return(false);
        }