5. Create and preview a game rule
Build this example in your Unreal practice project and check the result at each step.
On this page
Turn a simple game requirement into an explicit check on the selected data.
- Select
ConsumersByKeyand click Use selected DataTables. If needed, reloadname-string-profile.jsonto keep theTargetKeyrelationship declared. - Open Configure references and game rules → References and game rules, then click Create rule.
- Choose
ConsumersByKeyas the source table,Labelas the field and the uniqueness check. Give it a name and message that explain the requirement. - Click Preview on selected tables. The three labels are distinct, so the rows should pass this rule.
- To try a failure, edit
D3.Labelto exactly matchD2.Label. Preview again: the rule should flag the duplicate label. - Restore
D3.LabeltoWarehouse, preview again and, when the draft is correct, click Save rule and review. - Check the new status and results. This rule is separate from the reference review; do not disable it to hide a data condition that still fails.
Preview on selected tables evaluates the draft without saving it. Editing the rule invalidates that preview. Check coverage and the Pass, Fail, Not applicable or Not evaluable outcome before acting.
If Label is not offered for the rule, confirm that ConsumersByKey is selected and Label is a top-level String property. A Not evaluable outcome requires reviewing its details and coverage; do not assume it passed.