Search Unity

AnimationCurve and integers

Discussion in 'Scripting' started by Deleted User, Dec 17, 2014.

  1. Deleted User

    Deleted User

    Guest

    I'm trying to create animation curves at runtime to assing to an animation clip. Specifically I'm trying to "animate" a set of ints but I noticed that isn't a supported value for keyframes, so I'm trying to find a workaround to make this work and foudn this on the docs:

    "Booleans in script components are not supported by the animation system, but booleans in certain built-in components are. For those booleans, a value of 0 equals False while any other value equals True."

    Any idea how this is managed for special cases on booleans? As it may be helpfull to find a workaround for integers too. Also noticed that by changing a value of a float trough a curve that has an accessor the value won't be changed, but turning the variable into a simple public float it works, any reason for that?

    Thnaks.