GetModelImporterSerializedObject() private static method

private static GetModelImporterSerializedObject ( string assetPath ) : SerializedObject
assetPath string
return SerializedObject
Exemplo n.º 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();
        }
Exemplo n.º 2
0
        private void CopyHumanDescriptionFromOtherModel(Avatar sourceAvatar)
        {
            SerializedObject serializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(AssetDatabase.GetAssetPath((UnityEngine.Object)sourceAvatar));

            ModelImporterRigEditor.CopyHumanDescriptionToDestination(serializedObject, this.serializedObject);
            serializedObject.Dispose();
        }
        private void CopyHumanDescriptionFromOtherModel(Avatar sourceAvatar)
        {
            string           assetPath = AssetDatabase.GetAssetPath(sourceAvatar);
            SerializedObject modelImporterSerializedObject = ModelImporterRigEditor.GetModelImporterSerializedObject(assetPath);

            ModelImporterRigEditor.CopyHumanDescriptionToDestination(modelImporterSerializedObject, base.serializedObject);
            modelImporterSerializedObject.Dispose();
        }
        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();
            }
        }