animcurve_exists

This function will return true if the given Animation Curve Asset or Animation Curve Struct exists and is a valid Animation Curve, or false if it isn't.

 

Syntax:

animcurve_exists(curve_struct_or_id);

Argument Type Description
curve_struct_or_id Animation Curve Struct or Animation Curve Asset The Animation Curve that will be checked.

 

Returns:

Boolean

 

Example:

if (animcurve_exists(spring_curve))
{
    apply_spring_animation(sprite_curve);
}

The above code checks if the Animation Curve stored in the custom spring_curve variable exists. If it does, it runs a custom method to use that Animation Curve.