Class InputMetadataReconciler
Reattaches a ScyllaInputActionsMetadata asset to its action asset after the action asset has changed underneath it.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public static class InputMetadataReconciler
Remarks
Records are keyed by GUID, so an ordinary rename needs no work: the GUID still resolves and only the cached name is refreshed. The interesting cases are the ones where the GUID no longer resolves, which happens when an element is deleted and re-added, when a merge regenerates identifiers, or when somebody hand-edits the file. There the cached name is the only way back, and matching on it recovers the record.
Nothing is ever deleted. A record whose element cannot be found is quarantined and restored automatically if the element reappears, because the usual cause is a branch switch or a half-applied merge rather than an intentional removal, and a designer's notes are not something to discard on a guess. For the same reason, two candidates matching one record is reported rather than resolved.
This is pure. It takes a parsed document and a ScriptableObject, mutates the latter, and returns a report. It touches no editor API and no static state, so the whole algorithm is unit-testable with no scene and no asset database.
Methods
Reconcile(InputActionsDocument, ScyllaInputActionsMetadata, InputReconcileOptions)
Reattaches every metadata record to its element in the document, repairing what can be repaired and quarantining what cannot.
Declaration
public static InputReconcileReport Reconcile(InputActionsDocument document, ScyllaInputActionsMetadata metadata, InputReconcileOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| InputActionsDocument | document | The parsed action asset. |
| ScyllaInputActionsMetadata | metadata | The sidecar to reconcile. Mutated in place. |
| InputReconcileOptions | options | Behavior knobs, or |
Returns
| Type | Description |
|---|---|
| InputReconcileReport | A report of everything that happened. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when the document or the metadata is |