UnityEditor.SerializedObject.CopyFromSerializedProperty C# (CSharp) Method

CopyFromSerializedProperty() private method

private CopyFromSerializedProperty ( UnityEditor.SerializedProperty prop ) : void
prop UnityEditor.SerializedProperty
return void
        public extern void CopyFromSerializedProperty(SerializedProperty prop);
        [MethodImpl(MethodImplOptions.InternalCall), ThreadAndSerializationSafe]

Usage Example

示例#1
0
        private void SetupReferencedClip(string otherModelImporterPath)
        {
            SerializedObject targetImporter = GetModelImporterSerializedObject(otherModelImporterPath);

            // We may receive a path that doesn't have a importer.
            if (targetImporter != null)
            {
                targetImporter.CopyFromSerializedProperty(serializedObject.FindProperty("m_AnimationType"));

                SerializedProperty copyAvatar = targetImporter.FindProperty("m_CopyAvatar");
                if (copyAvatar != null)
                {
                    copyAvatar.boolValue = true;
                }

                SerializedProperty avatar = targetImporter.FindProperty("m_LastHumanDescriptionAvatarSource");
                if (avatar != null)
                {
                    avatar.objectReferenceValue = m_Avatar;
                }

                CopyHumanDescriptionToDestination(serializedObject, targetImporter);
                targetImporter.ApplyModifiedProperties();
                targetImporter.Dispose();
            }
        }
All Usage Examples Of UnityEditor.SerializedObject::CopyFromSerializedProperty