Search Unity

Custom animatable properties and event parameters

Discussion in 'Animation' started by gsaurus, Jun 29, 2014.

  1. gsaurus

    gsaurus

    Joined:
    Aug 7, 2013
    Posts:
    3
    Unity animation is great to control state that is dependent of animation flow. But only floats (and Vector2,3,4, Color, Quaternion) and boolean variables can be modified through animations. For anything else we have to use events, which aren't as nice-looking and practical, specially when we start having lots of them.

    For integer variables we can roughly turn them as floats, but for example I felt the need of having a string that changes often during animation, and I can't record the changes through editing it in the inspector for the desired keyframes. My only option is using a lot of event calls.

    I understand that an AnimationCurve for such property wouldn't make much sense (neither for bools do, but bools are animatable), but it would be very handy if we could change it on the fly using the animation system.


    Speaking of that, another need I felt was to call events with Vector3 parameters, for example to add force to a rigidbody at certain keyframes. Since it's not possible, I had to create 3 events (one for x, one for y and one for z), contributing once more for events hell.

    It would be great if we could use custom animatable properties and event parameters as long as they are serializable.
     
    kana1939 likes this.
  2. gsaurus

    gsaurus

    Joined:
    Aug 7, 2013
    Posts:
    3
    well, not a single reply? I'd like to know what other people think about it. Would you find it handy? Are there plans on extending or refactoring the system for other var/param types? Is there a way of achieving that through extensions? Are my points just irrelevant?
     
    Last edited: Jul 7, 2014
    danUnity likes this.
  3. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I have the same question! I just needed to animate a string property and I was not able to do it!
     
    danUnity likes this.
  4. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    I have the same problem... Would be really great if they would extend the list of properties that can be animated within the Animation window...
     
  5. KingTeehl

    KingTeehl

    Joined:
    Jan 7, 2020
    Posts:
    2
    Fully Agree, this is killing me! Please share if anyone has a solution to animating (Hooking a Property to an Animation Keyframe) strings, arrays etc.
     
    danUnity likes this.