public static AnimationClipSelectionItem Create(AnimationClip animationClip, UnityEngine.Object sourceObject) { AnimationClipSelectionItem animationClipSelectionItem = ScriptableObject.CreateInstance(typeof(AnimationClipSelectionItem)) as AnimationClipSelectionItem; animationClipSelectionItem.gameObject = (sourceObject as GameObject); animationClipSelectionItem.scriptableObject = (sourceObject as ScriptableObject); animationClipSelectionItem.animationClip = animationClip; animationClipSelectionItem.id = 0; return(animationClipSelectionItem); }
public static AnimationClipSelectionItem Create(AnimationClip animationClip, Object sourceObject) { AnimationClipSelectionItem selectionItem = CreateInstance(typeof(AnimationClipSelectionItem)) as AnimationClipSelectionItem; selectionItem.gameObject = sourceObject as GameObject; selectionItem.scriptableObject = sourceObject as ScriptableObject; selectionItem.animationClip = animationClip; selectionItem.id = 0; // no need for id since there's only one item in selection. return(selectionItem); }
public static AnimationClipSelectionItem Create(AnimationClip animationClip, UnityEngine.Object sourceObject) { AnimationClipSelectionItem item = ScriptableObject.CreateInstance(typeof(AnimationClipSelectionItem)) as AnimationClipSelectionItem; item.hideFlags = HideFlags.HideAndDontSave; item.gameObject = sourceObject as GameObject; item.scriptableObject = sourceObject as ScriptableObject; item.animationClip = animationClip; item.timeOffset = 0f; item.id = 0; return(item); }