public static void regUndoSelectedTake(AnimatorData data, string name) { #if UNITY_EDITOR if (!EditorApplication.isPlaying) { if (data.currentTake < 0) { return; } var take = data.getCurrentTake(); if (take != null) { AMUtil.recordObject(take, name); } } #endif }
// add a new key // the parameters should be set by AMTimeline inspector public void addKey(int _frame) { foreach (AMAnimatorKey key in keys) { // if key exists on frame, update key if (key.frame == _frame) { AMUtil.recordObject(key, "update key"); // update cache updateCache(); return; } } AMAnimatorKey a = ScriptableObject.CreateInstance <AMAnimatorKey>(); a.frame = _frame; a.easeType = (int)AMTween.EaseType.linear; // add a new key AMUtil.recordObject(this, "add key"); keys.Add(a); // update cache updateCache(); }
private void _clearCache() { AMUtil.recordObject(this, "clear cache"); cache = new List <AMAction>(); }