Comment on page
Add more life to your environment with animated content
In order to have animation within your world that is in sync amongst all users in there, you'll need to use AnimatiorView. AnimatorView allows you to play and swap between animations and sync them with all the users in the area.
Add AnimatorView and GuidComponent to a GameObject. Then, create an object with an animator, unless you already have one, add assign it to AnimatorView's Animator property field.
To change between different animations to play, call AnimatorView.Play(animationName). The animationName should coresspond to the name of the Animation asset.
Here is a brief explanation on the local variables:
You'll also need to set up the Animator Controller to work with AnimatorView.
Create an Animator Controller in your project's assets.
Create a parameter of type float in your controller with the same name as your Normalized Time Paramter Name, by default it's "progress".
On each state, set the Motion Time to the parameter you just created.