API reference
API reference
Select your platform
No SDKs available
No versions available

OVRSpaceUser Struct

Extends System.IDisposable
Represents a user for purposes of sharing scene anchors.
In order to share an anchor, you need to specify the user or users with whom you'd like to share those anchor(s).
An OVRSpaceUser is a lightweight struct that wraps a native handle to a space user. You can create an OVRSpaceUser from the user id of an Oculus user obtained from the Platform SDK.

Constructors

OVRSpaceUser ( spaceUserId )
Creates a space user handle for given Oculus user ID.
Signature
OVRSpaceUser.OVRSpaceUser(ulong spaceUserId)
Parameters
spaceUserId: ulong  The Facebook user ID obtained from the other party over the network

Properties

Id : ulong
[Get]
The user ID associated with this OVRSpaceUser.
This property is the spaceUserId argument provided to the OVRSpaceUser constructor, or zero if the OVRSpaceUser is not valid (Valid is false).
Signature
ulong OVRSpaceUser.Id
Valid : bool
[Get]
Checks if the user is valid.
The OVRSpaceUser may be invalid if it has been disposed (Dispose) or if it was default-constructed, for example:
void Test(ulong spaceUserId) {
  var spaceUser = new OVRSpaceUser(spaceUserId);
  Debug.Log(spaceUser.Valid); // True

  spaceUser.Dispose();
  Debug.Log(spaceUser.Valid); // False
}
Signature
bool OVRSpaceUser.Valid

Methods

Dispose ()
Disposes of the OVRSpaceUser.
This method does not destroy the user account. It disposes the handle used to reference it.
Signature
void OVRSpaceUser.Dispose()
Returns
void