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