Method Serialize
Serialize(Allocator)
Serialize the ARWorldMap
to an array of bytes. This array can be saved to disk
and loaded at another time to persist the session, or sent over a network
to another ARKit-enabled app to share the session.
It is an error to call this method after the ARWorldMap
has been disposed.
The caller owns the returned
NativeArray
and is responsible for disposing it.
Declaration
public NativeArray<byte> Serialize(Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Allocator | allocator | The allocator to use for the returned NativeArray of bytes. |
Returns
Type | Description |
---|---|
Native |
An array of bytes representing the serialized |
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if the world map is not valid. |
Invalid |
Thrown if the world map could not be serialized to a byte array. |