ISpaceObject
Space Content Service
Interface
A space object interface that allows for read and write access to the object. Setting values on the object requires the local client to have ownership of the object.
Properties
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. |
Methods
RemoveVariable(byte) | Remove a variable from the space object. Requires the local actor to have ownership of the object. Note that depending on the context, removing a variable may not be instantaneous but it will always be performed in the same frame. |
SetVariable(byte, object) | Same as but with an object type. Provided for convenience. |
SetVariable<T>(byte, T) | Set the value of, or create a variable on the space object. Requires the local actor to have ownership of the object. Note that depending on the context, setting a variable may not be instantaneous but it will always be performed in the same frame. |
Inherited Members
Equals(IReadOnlySpaceObject) | |
Equals(ISpaceObject) | |
TryGetVariable(byte, out object) | Retrieves the value of a variable on the space object. |
TryGetVariable(byte, out object) | Retrieves the value of a variable on the space object. |
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. |
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. |
ownerActorNumber | The actorNumber of the actor that currently owns the space object. |
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
|