void Awake() { childs = GetComponentsInChildren <Transform>(); animator = gameObject.GetComponent <Animator>(); switch (action) { case Action.RECORD_MOVEMENT: recorder = new UnityEditor.Experimental.Animations.GameObjectRecorder(); animator.enabled = false; break; case Action.NORMAL_MOVEMENT: animator.enabled = false; break; case Action.USE_ANIMATION: animator.enabled = true; UnableComponents(); animator.runtimeAnimatorController = animController; moveToSelectedFrame = false; movedFrame = false; break; } }
public void starRecoder() { if (animTarget == null) { Debug.LogError("Animation Target is Null"); return; } clip = new AnimationClip(); _recorder = new UnityEditor.Experimental.Animations.GameObjectRecorder(); _recorder.root = animTarget.gameObject; _recorder.BindComponent <Transform>(animTarget.gameObject, recursionChild); record = true; TargetTween(0); }
private static extern void Internal_Create([Writable] GameObjectRecorder notSelf, [NotNull] GameObject root);
public GameObjectRecorder(GameObject root) { GameObjectRecorder.Internal_Create(this, root); }
private static extern void Internal_Create([Writable] GameObjectRecorder notSelf);
public GameObjectRecorder() { GameObjectRecorder.Internal_Create(this); }