Exemplo n.º 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();
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 ///Copy a clip
 public static void CopyClip(ActionClip clip)
 {
     copyJson = JsonUtility.ToJson(clip, false);
     copyType = clip.GetType();
 }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 public static void CutClip(ActionClip action)
 {
     copyJson = JsonUtility.ToJson(action, false);
     copyType = action.GetType();
     (action.parent as CutsceneTrack).DeleteAction(action);
 }
Exemplo n.º 7
0
 public static void CopyClip(ActionClip action)
 {
     copyJson = JsonUtility.ToJson(action, false);
     copyType = action.GetType();
 }