Manual Animations

ObjectNet allows to manually animate objects instead using auto animation provided by Network Prefab ( see Synchronization Options).

To animate objects using ObjectNet API you need to use one of the following code.

//similar to unity animator.Play
this.Animation.Play("clipName");

//similar to unity animtor.Crossfade
this.Animation.CrossFade("ClipName", float normalizedTransitionDuration);

//similar to unity animator.CrossFadeInFixedTime
this.Animation.CrossFadeInFixedTime("ClipName", float fixedTransitionDuration);

This method will play animation locally and send animation event over network to be played on network instances

Note: You can do the same or create a custom synchronization by using your own event.

Last updated