Example #1
0
 ///Remove an ActionClip from this Track
 public void DeleteAction(ActionClip action)
 {
     UnityEditor.Undo.RegisterCompleteObjectUndo(this, "Remove Action");
     actions.Remove(action);
     if (ReferenceEquals(CutsceneUtility.selectedObject, action))
     {
         CutsceneUtility.selectedObject = null;
     }
     UnityEditor.Undo.DestroyObjectImmediate(action);
     root.Validate();
 }
Example #2
0
        ///Pastes the object's values from editor prefs json
        public static void PasteClipValues(ActionClip clip)
        {
            var json         = EditorPrefs.GetString("Slate_CopyDirectableValuesJSON");
            var wasStartTime = clip.startTime;
            var wasEndTime   = clip.endTime;
            var wasBlendIn   = clip.blendIn;
            var wasBlendOut  = clip.blendOut;

            JsonUtility.FromJsonOverwrite(json, clip);
            clip.startTime = wasStartTime;
            clip.endTime   = wasEndTime;
            clip.blendIn   = wasBlendIn;
            clip.blendOut  = wasBlendOut;
        }
Example #3
0
 ///Cut a clip
 public static void CutClip(ActionClip clip)
 {
     copyJson = JsonUtility.ToJson(clip, false);
     copyType = clip.GetType();
     (clip.parent as CutsceneTrack).DeleteAction(clip);
 }
Example #4
0
 ///Copy a clip
 public static void CopyClip(ActionClip clip)
 {
     copyJson = JsonUtility.ToJson(clip, false);
     copyType = clip.GetType();
 }
Example #5
0
        ///Copies the object's values to editor prefs json
        public static void CopyClipValues(ActionClip clip)
        {
            var json = JsonUtility.ToJson(clip);

            EditorPrefs.SetString("Slate_CopyDirectableValuesJSON", json);
        }
Example #6
0
 public static void CutClip(ActionClip action)
 {
     copyJson = JsonUtility.ToJson(action, false);
     copyType = action.GetType();
     (action.parent as CutsceneTrack).DeleteAction(action);
 }
Example #7
0
 public static void CopyClip(ActionClip action)
 {
     copyJson = JsonUtility.ToJson(action, false);
     copyType = action.GetType();
 }