animcurve_exists

This function returns if the given Animation Curve Asset or Animation Curve Struct exists and is a valid Animation Curve.

 

Syntax:

animcurve_exists(curve_struct_or_id);

ArgumentTypeDescription
curve_struct_or_idAnimation Curve Struct or Animation Curve AssetThe Animation Curve asset or struct 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.