This PR adds a default implementation for Scene -> Snapshot using the interfaces defined in #1466. There were also a few related changes to make this more ergonomic/correct:
Snapshot now implements IDisposable as we need to dispose of the serialized schema data once we write out a snapshot.
Snapshot now auto-adds the Persistence component to entities. I.e. - snapshot.Add(entityTemplate); is pretty clear you do want the entity to be persistent!
Description
This PR adds a default implementation for Scene -> Snapshot using the interfaces defined in #1466. There were also a few related changes to make this more ergonomic/correct:
Snapshot
now implementsIDisposable
as we need to dispose of the serialized schema data once we write out a snapshot.Snapshot
now auto-adds thePersistence
component to entities. I.e. -snapshot.Add(entityTemplate);
is pretty clear you do want the entity to be persistent!Tests
Documentation