Inheritance: AssetImporterInspector
コード例 #1
0
        private void SetupReferencedClip(string otherModelImporterPath)
        {
            SerializedObject serializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(otherModelImporterPath);

            if (serializedObject == null)
            {
                return;
            }
            serializedObject.CopyFromSerializedProperty(this.serializedObject.FindProperty("m_AnimationType"));
            SerializedProperty property1 = serializedObject.FindProperty("m_CopyAvatar");

            if (property1 != null)
            {
                property1.boolValue = true;
            }
            SerializedProperty property2 = serializedObject.FindProperty("m_LastHumanDescriptionAvatarSource");

            if (property2 != null)
            {
                property2.objectReferenceValue = (UnityEngine.Object) this.m_Avatar;
            }
            ModelImporterRigEditor.CopyHumanDescriptionToDestination(this.serializedObject, serializedObject);
            serializedObject.ApplyModifiedProperties();
            serializedObject.Dispose();
        }
コード例 #2
0
        private void CopyHumanDescriptionFromOtherModel(Avatar sourceAvatar)
        {
            SerializedObject serializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(AssetDatabase.GetAssetPath((UnityEngine.Object)sourceAvatar));

            ModelImporterRigEditor.CopyHumanDescriptionToDestination(serializedObject, this.serializedObject);
            serializedObject.Dispose();
        }
コード例 #3
0
        private void CopyHumanDescriptionFromOtherModel(Avatar sourceAvatar)
        {
            string           assetPath = AssetDatabase.GetAssetPath(sourceAvatar);
            SerializedObject modelImporterSerializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(assetPath);

            ModelImporterRigEditor.CopyHumanDescriptionToDestination(modelImporterSerializedObject, base.serializedObject);
            modelImporterSerializedObject.Dispose();
        }
コード例 #4
0
 private void CheckIfAvatarCopyIsUpToDate()
 {
     if (this.animationType != ModelImporterAnimationType.Human && this.animationType != ModelImporterAnimationType.Generic || this.m_AvatarSource.objectReferenceValue == (UnityEngine.Object)null)
     {
         this.m_AvatarCopyIsUpToDate = true;
     }
     else
     {
         this.m_AvatarCopyIsUpToDate = ModelImporterRigEditor.DoesHumanDescriptionMatch(this.singleImporter, AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(this.m_AvatarSource.objectReferenceValue)) as ModelImporter);
     }
 }
コード例 #5
0
        private void CheckIfAvatarCopyIsUpToDate()
        {
            if ((this.animationType != ModelImporterAnimationType.Human && this.animationType != ModelImporterAnimationType.Generic) || this.m_AvatarSource.objectReferenceValue == null)
            {
                this.m_AvatarCopyIsUpToDate = true;
                return;
            }
            string        assetPath     = AssetDatabase.GetAssetPath(this.m_AvatarSource.objectReferenceValue);
            ModelImporter otherImporter = AssetImporter.GetAtPath(assetPath) as ModelImporter;

            this.m_AvatarCopyIsUpToDate = ModelImporterRigEditor.DoesHumanDescriptionMatch(this.singleImporter, otherImporter);
        }
コード例 #6
0
        private void SetupReferencedClip(string otherModelImporterPath)
        {
            SerializedObject modelImporterSerializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(otherModelImporterPath);

            if (modelImporterSerializedObject != null)
            {
                modelImporterSerializedObject.CopyFromSerializedProperty(base.serializedObject.FindProperty("m_AnimationType"));
                SerializedProperty serializedProperty = modelImporterSerializedObject.FindProperty("m_CopyAvatar");
                if (serializedProperty != null)
                {
                    serializedProperty.boolValue = true;
                }
                SerializedProperty serializedProperty2 = modelImporterSerializedObject.FindProperty("m_LastHumanDescriptionAvatarSource");
                if (serializedProperty2 != null)
                {
                    serializedProperty2.objectReferenceValue = this.m_Avatar;
                }
                ModelImporterRigEditor.CopyHumanDescriptionToDestination(base.serializedObject, modelImporterSerializedObject);
                modelImporterSerializedObject.ApplyModifiedProperties();
                modelImporterSerializedObject.Dispose();
            }
        }