Class SettingsRowActionRules
The pure decision behind the Settings step's per-row button(s): exactly one primary action per SerenitySystemConfigurationState (Resolve(SerenitySystemConfigurationRow)), plus an optional secondary action (ResolveSecondary(SerenitySystemConfigurationRow, int)) — so the mapping is testable without drawing anything.
Inherited Members
Namespace: Serenity.CreateGame.Infrastructure.Editor
Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
Syntax
public static class SettingsRowActionRules
Methods
Resolve(SerenitySystemConfigurationRow)
The one primary action row offers, mapped from its
State — a Missing
row whose Hub tool does not reliably author its settings type
(CreatesSettingsViaHubTool is false) offers
CreateDefault instead of routing to that Hub tool.
Declaration
public static SettingsRowAction Resolve(SerenitySystemConfigurationRow row)
Parameters
| Type | Name | Description |
|---|---|---|
| SerenitySystemConfigurationRow | row |
Returns
| Type | Description |
|---|---|
| SettingsRowAction |
ResolveSecondary(SerenitySystemConfigurationRow, int)
The secondary action row offers alongside Resolve(SerenitySystemConfigurationRow)'s
primary one, or null when it offers none, in priority order: Assign
for an InProject row carrying an assignable
(non-dangling) UnassignedReference;
AdoptAllAssets for an InPackage
row (nothing project-owned exists yet, so every shipped asset is still adoptable) or for an
InProject row with at least one remaining shipped
asset per remainingShippedSystemAssetCount; Create
(labeled "Create (wizard)") for a Missing row whose
primary action is already CreateDefault — the Hub tool still
works, it is just not the reliable default.
Declaration
public static SettingsRowAction ResolveSecondary(SerenitySystemConfigurationRow row, int remainingShippedSystemAssetCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| SerenitySystemConfigurationRow | row | |
| int | remainingShippedSystemAssetCount |
Returns
| Type | Description |
|---|---|
| SettingsRowAction |
ShouldOfferValidateDrivers(SerenitySystemConfigurationRow)
Whether row offers a Validate drivers button — only a bootstrap-installed
system (InstallsAtBootstrap) whose settings are
already InProject has drivers worth validating.
Declaration
public static bool ShouldOfferValidateDrivers(SerenitySystemConfigurationRow row)
Parameters
| Type | Name | Description |
|---|---|---|
| SerenitySystemConfigurationRow | row |
Returns
| Type | Description |
|---|---|
| bool |
ShouldOfferVerify(SerenitySystemConfigurationRow)
Whether row offers a Verify button — a row's adopted asset can only
still reference package content once it is InProject.
Declaration
public static bool ShouldOfferVerify(SerenitySystemConfigurationRow row)
Parameters
| Type | Name | Description |
|---|---|---|
| SerenitySystemConfigurationRow | row |
Returns
| Type | Description |
|---|---|
| bool |