Search Unity

AnimationClipCurveData

Discussion in 'Getting Started' started by Deleted User, May 17, 2019.

  1. Deleted User

    Deleted User

    Guest

    Can someone give me an example using a property of AnimationClipCurveData? Like propertyName?

    I see AnimationClipCurveData is a box you store something in, but in the manual I see it also does something with curve, path, propertyName and type properties.
     
    Xwad likes this.
  2. Deleted User

    Deleted User

    Guest

    Oh ok.

    AnimationClipCurveData data;
    data.propertyName;

    When using the manual is also suggests AnimationUtilty. When I see code snippets it is AnimationUtilty which gives CurveData what it needs.
     
  3. Deleted User

    Deleted User

    Guest

    I've got this far


    [MenuItem("KevinMenu/Show me something")]
    static void ShowMeTheAnimation()
    {
    GameObject obj = Selection.activeGameObject;
    Animation anim = obj.GetComponent<Animation>();
    }


    What I wanted to do is choose an object, go to the menu, then Debug.Log prints out propertyName