HoloFair SDK V4
  • 🛠️Welcome to HoloFair SDK
  • Development
    • ⚙️Initial Setup
      • Start Here
      • Setup Addressables
      • Updating HoloFair SDK in an existing project
      • Scenes & Layers
      • Portals
      • WorldSettings
      • Build & Upload Addressables
        • CloudFront
        • BunnyCDN
      • Pubish & Test your Metaverse
    • ⭐Features
      • Text
      • Respawn
      • Link
      • Image
      • Video
      • TalkZone
      • Emote
      • Timer
      • Add Force
      • Animated Objects
      • Special/VIP content
      • Localization
      • Timeline
      • Focus Point
      • REST API Integration
        • Serialized Variables
        • Smart String
      • Interaction Events
        • Use Cases for Interaction Events
      • Editing Values
      • Control Locker
    • ‼️Important
      • Format of 3D Assets
      • 🆔GUIDs
  • Guides
    • Custom User Authentication
Powered by GitBook
On this page
  1. Development
  2. Features

Animated Objects

Add more life to your environment with animated content

PreviousAdd ForceNextSpecial/VIP content

Last updated 2 years ago

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:

Loop

Self explanatory. If the animation should start again after it ends.

Normalized Time Parameter Name

Name of the parameter in the animator controller used for progressing through the animation.

Layer Index

Layer index of the animator.

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.

⭐