Keying Custom Class Values in an Animation

Hello,

My first time asking a question here (I think) so I thank you guys and gals for the help in advance.

I have made a simple property class in my main class:

[System.Serializable]
public class VollyFireControls
{
	public int repeat;
	public float shotDelay;
	public float speedModifier;
}

I know you can key properties and values in animations made directly under the main class, but I want to key some of these values from the custom property class in the object’s animation as well.

Is there some attribute I can attach to the class to do this? I’ve looked around but I may using the word words while searching.

using C# btw.

Edit: I also noticed that integers don’t show up as keyable code in animations either.

Hi,

If your class inherits from MonoBehavior than you’ll be able to animate it properly. Also what you can do is to change that class to a struct and you’ll be able to animate everything like normal.

You just can’t animated properties of a subclass. You also can’t animate getter and setter properties.

There’s absolutely NOT DOCUMENTATION whatsoever on that so everybody is confused including me.

Good luck