Common Enums
Categories:
Common Enums provides shared enumeration types registered with O3DE’s SerializeContext. They can be used in component properties, asset fields, and ScriptCanvas nodes across any gem in the framework. The two primary enums are CurveType (curve selection for motion and gradient systems) and BooleanConditions (condition evaluation for dialogue and record-keeping systems).
Reflect functions: GS_Core::ReflectCommonEnums(context), GS_Core::ReflectCurveType(context)
For usage guides and setup examples, see The Basics: GS_Core.
Contents
BooleanConditions
Used by condition-evaluation logic in the dialogue and record-keeping systems to compare numeric or string values.
Used by: DialogueCondition, Record_DialogueCondition, RecordKeeperComponent
| Value | Description |
|---|---|
Equals | Exact equality check |
NotEquals | Inequality check |
GreaterThan | Strict greater-than |
GreaterOrEquals | Greater-than or equal |
LessThan | Strict less-than |
LessOrEquals | Less-than or equal |
CurveType
Maps to all easing curve functions in the Curves utility. Used by GS_Motion tracks, blend profiles, gradient markers, and any system that needs designer-selectable easing.
Used by: GS_MotionTrack, UiMotionTrack, FeedbackMotionTrack, gradient markers, GS_PhantomCamBlendProfile
| Family | Values |
|---|---|
| Linear | Linear |
| Quadratic | EaseInQuadratic, EaseOutQuadratic, EaseInOutQuadratic |
| Cubic | EaseInCubic, EaseOutCubic, EaseInOutCubic |
| Quartic | EaseInQuartic, EaseOutQuartic, EaseInOutQuartic |
| Quintic | EaseInQuintic, EaseOutQuintic, EaseInOutQuintic |
| Sine | EaseInSine, EaseOutSine, EaseInOutSine |
| Exponential | EaseInExpo, EaseOutExpo, EaseInOutExpo |
| Circular | EaseInCirc, EaseOutCirc, EaseInOutCirc |
| Back | EaseInBack, EaseOutBack, EaseInOutBack |
| Elastic | EaseInElastic, EaseOutElastic, EaseInOutElastic |
| Bounce | EaseInBounce, EaseOutBounce, EaseInOutBounce |
Evaluating a CurveType in C++
#include <GS_Core/Utility/Math/CurvesUtility.h>
// Dispatch to the correct curve function via enum
float result = GS_Core::Curves::EvaluateCurve(GS_Core::CurveType::EaseInOutCubic, t);
Using Enums in Components
Use EnumAttribute on a DataElement with UIHandlers::ComboBox to expose enum selection as an Inspector dropdown.
#include <GS_Core/Utility/Math/CurvesUtility.h>
#include <GS_Core/Utility/CommonEnums.h>
// In your component's Reflect() method:
editContext->Class<MyComponent>("My Component", "Description")
->DataElement(AZ::Edit::UIHandlers::ComboBox,
&MyComponent::m_curveType, "Curve Type",
"The easing curve applied to this animation.")
->EnumAttribute(GS_Core::CurveType::Linear, "Linear")
->EnumAttribute(GS_Core::CurveType::EaseInQuadratic, "Ease In Quadratic")
->EnumAttribute(GS_Core::CurveType::EaseOutQuadratic, "Ease Out Quadratic")
->EnumAttribute(GS_Core::CurveType::EaseInOutQuadratic, "Ease InOut Quadratic")
->EnumAttribute(GS_Core::CurveType::EaseInCubic, "Ease In Cubic")
->EnumAttribute(GS_Core::CurveType::EaseOutCubic, "Ease Out Cubic")
->EnumAttribute(GS_Core::CurveType::EaseInOutCubic, "Ease InOut Cubic")
// ... continue for all desired variants
;
This creates an Inspector dropdown where designers select a curve by name without touching code.
See Also
For related resources:
Get GS_Core
GS_Core — Explore this gem on the product page and add it to your project.