SceneElementSerialization.RestoreSystem
Section titled “SceneElementSerialization.RestoreSystem”
- Recreates one scene system without invoking Reset and restores its persistent properties.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Scene
Declaration
Section titled “Declaration”public static Inno.Scene.GameSystem Inno.Scene.SceneElementSerialization.RestoreSystem(Inno.Scene.GameScene scene, Inno.Extensibility.Types.TypeRef type, System.Guid persistentId, int systemIndex, System.ReadOnlySpan<byte> stateData, Inno.Core.Serialization.SerializationRegistry serialization, Inno.Assets.IAssetReferenceResolver assets)Parameters
Section titled “Parameters”Parameter scene: The live loaded scene that will own the system.
Parameter type: The reload-safe identity of the current system implementation.
Parameter persistentId: The system instance identity to preserve.
Parameter systemIndex: The requested display and serialization index.
Parameter stateData: Complete neutral element bytes produced by CaptureState, including missing-state metadata.
Parameter serialization: The serialization registry that owns the active converter generation.
Parameter assets: The resolver used to materialize canonical asset references in restored properties.
Returns
Section titled “Returns”The recreated system, or a preserved missing placeholder when its logical type is unavailable.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentNullException: Thrown when scene is null.
Exception T:System.IO.InvalidDataException: Thrown when the payload is invalid or the stable type resolves to an incompatible system.
Exception T:System.InvalidOperationException: Thrown when the identity or system multiplicity conflicts, property restoration is incomplete, or a failed restoration cannot remove its partially created system.