Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Restores a previously captured subtree into a loaded scene with its original persistent identities.

API: engine
Project: Inno.Scene

public static Inno.Scene.GameObject Inno.Scene.SceneSubtreeSerialization.Restore(Inno.Scene.GameScene scene, System.ReadOnlySpan<byte> data, Inno.Core.Serialization.SerializationRegistry serialization, Inno.Assets.IAssetReferenceResolver assets, Inno.Scene.Components.Transform? parent, int siblingIndex)

Parameter scene: The loaded destination scene.

Parameter data: Bytes created by M:Inno.Scene.SceneSubtreeSerialization.Capture(Inno.Scene.GameObject,Inno.Core.Serialization.SerializationRegistry,Inno.Assets.IAssetReferenceResolver).

Parameter parent: The optional external parent restored after the subtree is created.

Parameter siblingIndex: The requested sibling index under parent or at the scene root.

Parameter serialization: The serialization registry that owns the active converter generation.

Parameter assets: The asset-reference resolver used to restore referenced asset identities.

The restored subtree root.

Exception T:System.ArgumentNullException: Thrown when scene is null.

Exception T:System.InvalidOperationException: Thrown when the scene is unavailable or an identity conflicts.