IReadOnlySpaceObject

Space Content Service

Interface

The data-model for an object as it exists on the server. Space objects can be created, destroyed, and modified by actors in the space.

Properties

canTakeOwnership

Whether the space object can be taken over by another actor.

creatorActorNumber

The actorNumber of the actor that created the space object.

flags

Space object behavior flags.

hasControl
hasVariables

Whether the space object has variables attached to it.

isDisposed

Whether the space object has been disposed. This will be true if the object has been destroyed. Disposed space objects can still be read from, but can no longer be edited.

isMine

Whether the space object is owned by the local actor (localActorNumber == ownerActorNumber).

objectID

The unique number of the space object in the current server instance. ObjectID's are allocated when space objects are created and cannot be modified.

objectType

Type of object it is, such as an avatar.

ownerActorNumber

The actorNumber of the actor that currently owns the space object.

position

The position of a space object in world space as it exists on the server. Note: This may not be the same as the position of the visual representation of the object in the scene because the visual representation may be smoothed or extrapolated.

rotation

The rotation of a space object in world space as it exists on the server. Note: This may not be the same as the rotation of the visual representation of the object in the scene because the visual representation may be smoothed or extrapolated.

scale

The scale of a space object in world space as it exists on the server. Note: This may not be the same as the scale of the visual representation of the object in the scene because the visual representation may be smoothed or extrapolated.

variables

A dictionary of variables that are attached to the space object. These are synchronized across all clients. This dictionary is never null, but may be empty. To check if object has any variables, use hasVariables for better performance.

Methods

TryGetVariable(byte, out object)

Retrieves the value of a variable on the space object.

TryGetVariable<T>(byte, out T)

Retrieves the value of a variable on the space object.

Events

onOwnerChanged

Event fired when the owner of the space object changes.

onVariablesChanged

Event fired when one or more variables on the space object have changed (added, changed, removed). The event is fired for all connected clients when they receive the change.