๐Ÿ› ๏ธ Choosers

Short Description

Detailed look at the UGorgeousConditionalObjectChooser class and the UGorgeousCondition evaluation logic.

Long Description

The relationship between Choosers and Conditions is the core of dynamic data selection in Gorgeous Core. A Chooser acts as the container, while the Condition defines the "how". This page explores the different evaluation modes, how to implement custom conditions, and how the system manages serialized data to ensure stability.

๐Ÿš€ Features

DecideCondition

The DecideCondition function evaluates the assigned ConditionCheck and returns the corresponding UGorgeousObjectVariable from the Conditions array. The specific variable returned depends on the logic defined in the Condition, allowing for dynamic selection based on runtime data.

Evaluates the assigned ConditionCheck and returns the corresponding UGorgeousObjectVariable from the Conditions array.

Type Description
UGorgeousObjectVariable* The selected Object Variable based on the condition evaluation.

Call the Decide Condition function on your Chooser instance to retrieve the appropriate Object Variable based on the current state of the assigned Condition.

Decide Condition Example
Example of calling DecideCondition to get the selected variable.
UGorgeousObjectVariable* SelectedVariable = MyChooser->DecideCondition();

CleanupInvalidEntries

The CleanupInvalidEntries function removes any invalid or placeholder references from the ConditionCheck and the Conditions array. This is particularly useful for repairing assets that may have become corrupted due to circular blueprint dependencies, ensuring that the Chooser remains functional and does not return invalid variables.

Cleans up invalid or placeholder entries from the ConditionCheck and Conditions array.

๐Ÿ“š Properties

Property Type Description
ConditionCheck UGorgeousCondition* The condition that will be evaluated to determine which variable to return.
Conditions TArray<UGorgeousObjectVariable*> The array of object variables that can be selected based on the condition evaluation. Each index corresponds to a potential outcome of the condition check.