private void Initialize() { AnimationInstancing instance = GetComponent <AnimationInstancing>(); if (instance) { int count = instance.GetAnimationCount(); //instance.PlayAnimation(Random.Range(0, count)); AnimationInstancing attachmentScript = attachment.GetComponent <AnimationInstancing>(); instance.Attach("ik_hand_r", attachmentScript); } updateObject = new UpdateObject(this, UpdateRender); PlayableUpdateManager.Reg(updateObject); }
private void OnDestroy() { PlayableUpdateManager.UnReg(updateObject); }