Let’s dig a little bit into Playable Layers.
To find the Playable Layers, click “Customize” on the Animation Layers section of the avatar descriptor.
These let you customize your root animator completely! You can do all kinds of stuff in here, from basic animations to custom locomotion to custom gestures to expressions to toggle-able avatar props and much much more. This is where Avatars 3.0 gets the majority of its complexity and power.
However, let’s start REALLY simple. Grab a Unity cube or sphere, parent it to your Hip on your avatar, create an animator, and animate the material on the cube changing colors on a loop, or maybe turning the object on and off. Whatever you choose to animate, remember that you should not use the FX layer for transform position/rotation animations. As long as you remember that, you should be fine!
Either way, slap that new Animator into the FX slot, open up the animator, and either drag in your cube animation or add an empty state (by right clicking) in the base layer and setting the motion.
In other words, you should go from
CubeColorLoop or some-such. Don’t forget to set your
CubeColorLoop (or whatever you call it) animation to Loop Time!
Once you’ve done that, you should be able to test the avatar and see the cube doing its thing once you load in.
- Load up your scene with your avatar
- Create a Unity cube/sphere/whatever
- Parent that object to your avatar’s hip and float it a lil bit in front of you so you can see it
- Create a material for that object and slap it on the object
- Create an animation that changes the color or disables/enables the object on a loop
- Set the animation to Loop Time
- Create a new Animator (name it FX so you don’t get confused later on)
- Put the new
FXanimator into the descriptor in the appropriate Playable Layer slot for FX
- In the animator itself, add the object animation into the base layer as the only state from the Entry state
- Save, Build & Test!
Some important notes:
- The FX layer will NOT work properly with Transform Position or Rotation animations. You use other layers for that, because things get complicated when blending those.
- FX is for things like shape keys / blendshapes, material and shader changes, animating particle system properties, disabling/enabling GameObjects, etc. Basically, everything you can animate that isn’t a transform animation. These will work in other layers, but they won’t be copied to your MirrorClone– so you won’t see things turning on/off in the mirror. If you don’t see something in a mirror that you think you should, you probably put it into the wrong Playable Layer.
- The other layers have specific, intended purposes with some special behavior on them. We’ll get to that.