/// <summary>
        /// Updates the <see cref="DynamicsManager" /> asset for the specified content submodule.
        /// </summary>
        /// <param name="type">
        /// The <see cref="ContentInfo" /> subclass for the content submodule.
        /// </param>
        public static DynamicsManager UpdateDynamicsManager(System.Type type)
        {
            DynamicsManager dynamicsManager;

            dynamicsManager = FindOrCreateDynamicsManager(type);

            SerializedObject serializedObject;

            serializedObject = new SerializedObject(dynamicsManager);
            serializedObject.FindProperty("m_ContentInfo").objectReferenceValue = ContentInfoEditor.FindContentInfo(type);
            serializedObject.ApplyModifiedPropertiesWithoutUndo();

            return(dynamicsManager);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the <see cref="GraphicsSettings" /> asset for the specified content submodule.
        /// </summary>
        /// <param name="type">
        /// The <see cref="ContentInfo" /> subclass for the content submodule.
        /// </param>
        public static GraphicsSettings UpdateGraphicsSettings(System.Type type)
        {
            GraphicsSettings graphicsSettings;

            graphicsSettings = FindOrCreateGraphicsSettings(type);

            SerializedObject serializedObject;

            serializedObject = new SerializedObject(graphicsSettings);
            serializedObject.FindProperty("m_ContentInfo").objectReferenceValue = ContentInfoEditor.FindContentInfo(type);
            serializedObject.ApplyModifiedPropertiesWithoutUndo();

            return(graphicsSettings);
        }