There is SerializeUtility.SerializeWorld, but this will display
ArgumentException: Blittable component type 'Unity.Physics.SimulationSingleton' contains a (potentially nested) pointer field. Serializing bare pointers will likely lead to runtime errors. Remove this field and consider serializing the data it points to another way such as by using a BlobAssetReference or a [Serializable] ISharedComponent. If for whatever reason the pointer field should in fact be serialized, add the [ChunkSerializable] attribute to your type to bypass this error.
so alright, SimulationSingleton contains a pointer, we probably don't want to serialize this anyway. so I move this out of the world, and try again.
then I get the same issue for Unity.Entities.BlobAssetOwner, but this time it's internal, so it seems we can't make a query for it?
it seems like a lot of Unity components are containing pointers now, wasn't the point of Unity.Physics that it's stateless??
I could probably get around this by writing a custom serializer and ignore components with pointers, but this probably won't be deterministic, I'm looking for a deterministic way.
what is the intended way of serializing and deserializing a world deterministically?