using System.Text.Json.Nodes; namespace Sandbox; /// /// This is added when a component is missing. It will store the json data of the missing component, so we don't lose any data. /// [Expose, Hide] public class MissingComponent : Component { string json { get; } public MissingComponent( JsonObject jso ) { json = jso.ToJsonString(); Flags |= ComponentFlags.Error; } /// /// Get the Json data that was deserialized /// public JsonObject GetJson() { return JsonObject.Parse( json ) as JsonObject; } }