Class SerializedSceneObject

Serializes the current state of a scene object and allows that state to be restored. The advantage of using this class versus normal serialization is that the deserialization happens into the original scene object, instead of creating a new scene object.

Hierarchy

  • FrameworkObject
    • SerializedSceneObject

Constructors

Accessors

Methods

Constructors

  • Creates a new SerializedSceneObject by serializing the provided scene object.

    Parameters

    • sceneObject: SceneObject

      Object whose state to serialize.

    • Optionalhierarchy: boolean

      If true all children of the provided scene object will be serialized as well, otherwise just the provided object will.

    • OptionalisInternalConstructor: boolean

    Returns SerializedSceneObject

Accessors

  • get isValid(): boolean
  • Determines if the serialization is valid

    Returns boolean

  • get sceneObjectUUID(): UUID
  • Gets the UUID of the serialized object

    Returns UUID

Methods

  • Records the current state of the scene object again, overwriting any previously recorded state.

    Parameters

    Returns void

  • Restores the scene object to the state as it was when this object was created. If the scene object was deleted since, it will be resurrected.

    Parameters

    • objectManager: SceneNodeManager

      The SceneNodeManager to restore the object on.

    • Optionalinstance: boolean

    Returns SceneObject

  • Restores the scene object to the state as it was when this object was created. If the scene object was deleted since, it will be resurrected.

    Parameters

    • sceneInstance: SceneInstance

      The SceneInstance to restore the object on.

    • Optionalinstance: boolean

    Returns SceneObject