Search Unity

Animate custom type property

Discussion in 'Animation' started by Virland, Nov 28, 2018.

  1. Virland

    Virland

    Joined:
    May 18, 2014
    Posts:
    10
    Hi, i trying to animate variable (for example) myClass of "MyClass" type with ObjectReferenceKeyframe in "MyComponent : MonoBehaviour",
    MyClass with Serializable attribute,
    editorCurveBinding. propertyName = "myClass";
    editorCurveBinding. type = typeof(MyComponent);
    so, animation successfully created via script, but playing this animation do not affect on myClass variable, its not changed, in Animation window property marked as "Missing" and i can't add it with "Add Property" button (property not shown in list) but same thing works with Sprite type, how can i use "MyClass" type this way? is it possible? Thx!
     
    Last edited: Nov 28, 2018