Search Unity

Creating boolean animation clip curves

Discussion in 'Immediate Mode GUI (IMGUI)' started by FeastSC2, Jun 9, 2017.

  1. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Creating float curves is done with:

    Code (CSharp):
    1. var keyframe = new Keyframe[10];
    2. keyframes.value =1f;
    Creating object curves is done with:

    Code (CSharp):
    1. var objectkeyframe = new ObjectReferenceKeyframe();
    2. objectkeyframe.value = someObject;

    But I can't find how to create a curve that has booleans in it. I tried to do it with the keyframe way and set the value to 1 or 0, it works but it displays weirdly in the animation window i.e. not with the trigger on and off but with number being 0 and 1.
     
    Last edited: Jun 9, 2017