Class SettingsReferenceInspector
Walks a settings asset's serialized object-reference properties looking for one whose declared field
type accepts another catalog system's settings type (SettingsReferenceRules) but holds no
value — either never configured, or dangling (objectReferenceInstanceIDValue != 0 with a null
resolved value, IsDangling) — and assigns a replacement
once a sole project-owned candidate exists.
Inheritance
SettingsReferenceInspector
Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
Syntax
public static class SettingsReferenceInspector
Methods
AssignReference(string, string, string)
Assigns the asset at referencedAssetPath into
propertyPath on the asset at ownerAssetPath, then saves.
Declaration
public static void AssignReference(string ownerAssetPath, string propertyPath, string referencedAssetPath)
Parameters
| Type |
Name |
Description |
| string |
ownerAssetPath |
|
| string |
propertyPath |
|
| string |
referencedAssetPath |
|
FindFirstUnassignedReference(Object, SerenityInstallableSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type>)
The first reference field on settingsAsset that is declared to hold
another catalog system's settings type but holds no value (unassigned or dangling), or null when
every such field is assigned (or none exists).
Declaration
public static SettingsRowUnassignedReference FindFirstUnassignedReference(Object settingsAsset, SerenityInstallableSystem ownerSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem)
Parameters
Returns
FindSoleProjectOwnedAssetPath(Type)
The asset path of the sole project-owned asset of referencedType, or
null when there is none or more than one — the only case an Assign action can proceed
unambiguously.
Declaration
public static string FindSoleProjectOwnedAssetPath(Type referencedType)
Parameters
| Type |
Name |
Description |
| Type |
referencedType |
|
Returns