Skip to main content

Animated Properties

Once a material is locked, the property values become constant and cannot be changed via an animation clip or by any other means. If you have an animation clip changing the values of locked materials, those clips will not do anything once the material is locked.

If you want an animation clip to change the values of a locked material, you have to set the properties that will be changed to be 'animated'. You can do so by right-clicking the property and clicking Is Animated.

info

Not all properties can be animated! If a property cannot be animated, it will not have an Is Animated option in the right-click menu.

  • Texture swaps cannot be animated. This is a Unity limitation.
  • Foldouts with toggles may also be animated, right-click to check!

You will be able to edit animated properties in the material editor when the material is locked.

A red background indicates that the property has been set as animated.

Auto Animating

The material editor can tell when you're recording an animation. If you modify a property while recording, that property will automatically be marked as animated, if it can be animated.


Renaming

Animation clips will change the value of the property for ALL materials on the mesh renderer. This means that if you have 2 materials on a mesh renderer and you want a single property to be animated differently between those two materials, it will not work: the animation clips will animate the property on both of the materials, no matter which one you made the animation clip on.

So to fix this, we need to set that property up to be renamed.

What does renaming do?

When a property is set to be animated, during locking, a copy of that property will be created with a new name that has the material's rename suffix attached to the end of it.

For example, if we're renaming a property _MyProperty and the material rename suffix is foobar, we'll get _MyProperty_RENAMED_foobar as the renamed property name.

You won't see any changes in the material editor as the material editor will automatically retarget edits made to the original property to instead change renamed property. If the material is unlocked, the value of the renamed property will be copied over to the original property.

Working with Renamed Properties

You can set a property to be animated by right-clicking on a property and selecting Is Renamed. All properties that can be animated will also be able to be renamed.

You can right-click on a property and get the name of the renamed property as well. This is useful for tools that can directly target material properties to create animations, such as VRCFury. When the material is locked, the 'Copy Property Name' option will always copy the renamed property name if the property has been renamed.

Material Rename Prefix

The material rename prefix is a small piece of text that will be added to the ending of a renamed property's name. The addition of this suffix is what solves our problem of animation clips animating all property values of the same name as we've now changed the name of the property!

A rename prefix is automatically created as soon as a property is set to renamed, if the material doesn't have a rename prefix.

You may also change the rename prefix to your own desired prefix. You can find the 'Rename Suffix' input field in the 'Advanced' tab.


Examples

  • 2 materials A and B with animation sliders. A is animated and B is animated and renamed. An animation clip to change the value of the A animation will NOT change the animation of the B material as B has it renamed (only when B is locked, of course.)

  • 2 materials A and B with animation sliders. A is animated and renamed and B is animated and renamed. Both have the rename suffix amogus. An animation clip to change the value of the A animation slider which WILL change the animation slider of the B material as both of them have the same rename suffix and they're the same property!

  • 2 materials A and B. A has a random property animated and renamed and B has a different random property animated and renamed. Both are renamed with the rename suffix amogus. An animation clip to change the value of the A property will not change the value of the B property beacuse they're different properties (so it doesn't matter if the prefix is the same across different properties)