//============================================================================================ /** * @brief * *********************************************************************************************/ public void CopyPreProcessData(MxMPreProcessData a_preProcessData) { m_overrideTagModule = a_preProcessData.OverrideTagModule; m_overrideEventModule = a_preProcessData.OverrideEventModule; m_overrideConfigModule = a_preProcessData.OverrideConfigModule; List<CompositeCategory> sourceCategories = a_preProcessData.CompositeCategories; m_compositeCategories = new List<CompositeCategory>(sourceCategories.Count + 1); foreach (CompositeCategory sourceCategory in sourceCategories) { CompositeCategory newCategory = new CompositeCategory(sourceCategory, this); m_compositeCategories.Add(newCategory); } List<MxMAnimationIdleSet> sourceIdleSets = a_preProcessData.AnimationIdleSets; m_animIdleSets = new List<MxMAnimationIdleSet>(sourceIdleSets.Count + 1); foreach(MxMAnimationIdleSet sourceIdleSet in sourceIdleSets) { MxMAnimationIdleSet newIdleSet = ScriptableObject.CreateInstance<MxMAnimationIdleSet>(); newIdleSet.CopyData(sourceIdleSet); newIdleSet.name = sourceIdleSet.name; newIdleSet.hideFlags = HideFlags.HideInHierarchy; newIdleSet.TargetAnimModule = this; newIdleSet.TargetPreProcess = null; EditorUtility.SetDirty(newIdleSet); AssetDatabase.AddObjectToAsset(newIdleSet, this); m_animIdleSets.Add(newIdleSet); } List<MxMBlendSpace> sourceBlendSpaces = a_preProcessData.BlendSpaces; m_blendSpaces = new List<MxMBlendSpace>(sourceBlendSpaces.Count + 1); foreach(MxMBlendSpace sourceBlendSpace in sourceBlendSpaces) { MxMBlendSpace newBlendSpace = ScriptableObject.CreateInstance<MxMBlendSpace>(); newBlendSpace.CopyData(sourceBlendSpace); newBlendSpace.name = sourceBlendSpace.name; newBlendSpace.hideFlags = HideFlags.HideInHierarchy; newBlendSpace.TargetAnimModule = this; newBlendSpace.TargetPreProcess = null; EditorUtility.SetDirty(newBlendSpace); AssetDatabase.AddObjectToAsset(newBlendSpace, this); m_blendSpaces.Add(newBlendSpace); } EditorUtility.SetDirty(this); }
public void OnEnable() { m_data = (MotionMatchConfigModule)target; m_spTargetPrefab = serializedObject.FindProperty("m_targetPrefab"); m_spTrajectoryTimes = serializedObject.FindProperty("m_trajectoryTimes"); m_spPoseProperties = serializedObject.FindProperty("m_poseJoints"); m_spUseGenericRig = serializedObject.FindProperty("m_getBonesByName"); InitializeGenericRigData(); }