protected virtual void RepairRoutine() { SequencePlayer player = target as SequencePlayer; if ((player.SafeMode == SequencePlayer.SafeModes.EditorOnly) || (player.SafeMode == SequencePlayer.SafeModes.Full)) { player.AutoRepair(); } serializedObject.ApplyModifiedProperties(); }
static public void PasteAll(SequencePlayerEditor targetEditor) { var sourceFeedbacks = new SerializedObject(CopyAllSourceSequencePlayer); SerializedProperty feedbacks = sourceFeedbacks.FindProperty("SequencePlayer"); for (int i = 0; i < feedbacks.arraySize; i++) { SequenceBase arrayFeedback = (feedbacks.GetArrayElementAtIndex(i).objectReferenceValue as SequenceBase); SequenceCopy.Copy(new SerializedObject(arrayFeedback)); SequenceBase newFeedback = targetEditor.AddSequence(arrayFeedback.GetType()); SerializedObject serialized = new SerializedObject(newFeedback); serialized.Update(); SequenceCopy.Paste(serialized); serialized.ApplyModifiedProperties(); } CopyAllSourceSequencePlayer = null; }
static public void CopyAll(SequencePlayer sourceSequencePlayer) { CopyAllSourceSequencePlayer = sourceSequencePlayer; }