API reference

SerializationHelpers Class

This contains helpers to serialize/deserialze Scene data to/from JSON.

Static Fields

UnrealWorldToMeters : const float
Signature
const float Meta.XR.MRUtilityKit.SerializationHelpers.UnrealWorldToMeters

Static Methods

Deserialize ( json )
Deserializes a JSON string into a list of MRUKRoom objects.
Signature
static Data.SceneData Meta.XR.MRUtilityKit.SerializationHelpers.Deserialize(string json)
Parameters
json: string  The JSON string representing the serialized scene data.
Returns
Data.SceneData  A list of MRUKRoom objects representing the deserialized scene data.
Serialize ( coordinateSystem , includeGlobalMesh )
Serializes the scene data into a JSON string.
The scene data includes rooms, anchors, and their associated properties. The method allows for the specification of the coordinate system (Unity or Unreal) and whether to include the global mesh data.
Signature
static string Meta.XR.MRUtilityKit.SerializationHelpers.Serialize(CoordinateSystem coordinateSystem, bool includeGlobalMesh=true)
Parameters
coordinateSystem: CoordinateSystem  The coordinate system to use for the serialization (Unity or Unreal).
includeGlobalMesh: bool  A boolean indicating whether to include the global mesh data in the serialization. Default is true.
Returns
string  A JSON string representing the serialized scene data.

Inner Enum

CoordinateSystem Enum

Enumeration Constants

Member
Unity
Unreal