Creating Toggle Animation

Creating Toggle Animation

Setup

To begin it is recommended to have your FX Animator in your avatar’s Animator.

Open your FX Animator

Click on your avatar, you should see a VRC Avatar Descriptor component somewhere in the Inspector. Then find your FX Animator by searching in VRC Avatar Descriptor > Playable Layers > FX. You can double-click to open it, or single-click to highlight it in your Project window.

Set the Animator Controller

By default your avatar should have an Animator component, but sometimes the Controller is set to another Animator Controller than your FX Animator.

Set the Controller in the Animator component on your avatar to the avatar’s FX Animator.

Open the Animation Window

If you don’t see the Animation window yet, open it.

In the top bar go to Window > Animation > Animation to open a new Animation window. (you can also press the shortcut Ctrl + 6)

Creating a new animation

Select your avatar

If you did the steps above, you should see the Animation window change, and maybe there will be an animation selected by default.

Example of Animation Window

Create a new animation

Click on the highlighted drop-down, a new list should pop up with all the animations on your avatar. Then click Create New Clip... button on the bottom of the list.

Tip

If you don’t see the Create New Clip... button on the bottom of the list, it’s probably because there are too many animations, and you need to scroll down. Fastest way I found to do this is by putting your mouse cursor at the first animation, then pressing arrow-up up your keyboard.

Saving the animation

Once you press the Create New Clip... button a new window will pop up asking where to save it. You can save it anywhere in your project’s Assets folder, but I suggest using an Animations folder inside your Assets folder.

Caution

Don’t create a new folder inside this window and then save an animation inside it. This will most likely break your entire unity project.

Creating keyframes

Keyframes are thing that says what an Animation does. For example, turning a GameObject on and off, changing the Hue Shift of a material, etc. They can be used to animate basically anything on your avatar.

To create a new keyframe click on the object you want to toggle, then press the record button. This will now automatically create keyframes for everything you toggle or change on an avatar, so be careful to not accidentally touch anything you don’t want to change.

Now enable and/or disable your GameObject to create a new keyframe. You can always change the value of the keyframe by clicking the checkbox next to the name. Or remove a keyframe by right-clicking on the name, and then Remove Property.

Create the inverse

Now that you have an On or Off Animation, create an inverse of what you just did. So if you made an On animation, now create an Off animation, and vise versa.

To do this follow the steps from Create a new animation down.

Creating the toggle

To create the toggle, check out the Toggles page.

Last updated on