Skip to content

EntitySerializer.RestoreComponent(Entity, string, JsonElement) Method

Definition

Namespace: Brine2D.ECS.Serialization

Restores a component from JSON data onto an entity. The component is fully deserialized before being attached so that OnAdded() fires with all restored values in place.

C#
private void RestoreComponent(Brine2D.ECS.Entity entity, string componentTypeName, System.Text.Json.JsonElement componentData);

Parameters

entity Entity

componentTypeName System.String

componentData System.Text.Json.JsonElement