Breakroom is now Sinewave Campus. Book a meeting

SVoiceZone

ClientComponents
On this classSetOverrideVoice
  1. Functions
  2. SetOverrideVoice
  3. ClearOverrideVoice
  4. SetOverrideVideo
  5. ClearOverrideVideo
  6. AddAuthVoiceUser
  7. RemoveAuthVoiceUser
  8. AddAuthVideoUser
  9. RemoveAuthVideoUser
  10. Properties
  11. Enabled
  12. AllowVoice
  13. AllowVideo
  14. ConnectVoiceService
  15. ConnectVideoService
  16. Priority
  17. AreaName
  18. Spatialized
  19. SpatialDropoff
  20. SpatialStereo
  21. SpatialDistance
  22. Global
  23. AuthVideoUsers
  24. AuthVoiceUsers
  25. GameObject
Members 23
FunctionSetOverrideVoiceSet voice to override the original voice.
FunctionClearOverrideVoiceClear the overriding voice.
FunctionSetOverrideVideo–
FunctionClearOverrideVideo–
FunctionAddAuthVoiceUserAdd a user to AuthVoiceUser by his ID.
FunctionRemoveAuthVoiceUserRemove a user from AuthVoiceUser by his ID.
FunctionAddAuthVideoUser–
FunctionRemoveAuthVideoUserRemove a user from AuthVoiceUser by his ID.
PropertyEnabledWhether the Voice Zone component is Enabled
PropertyAllowVoiceWhether allows voice.
PropertyAllowVideoWhether allows video.
PropertyConnectVoiceService–
PropertyConnectVideoService–
PropertyPriorityThe priority of the voice zone
PropertyAreaNameThe name of area.
PropertySpatializedWhether the voice zone is spatialized.
PropertySpatialDropoffWhether the voice zone is spatialized drop off.
PropertySpatialStereoWhether the voice zone is spatial stereo.
PropertySpatialDistanceThe spatial distance of the voice zone.
PropertyGlobalWhether the voice zone is global.
PropertyAuthVideoUsersReturn an array of auth video user.
PropertyAuthVoiceUsers–
PropertyGameObject–

Functions​

SetOverrideVoice​

void SetOverrideVoice(bool enabled)

Set voice to override the original voice.

Parameters

NameTypeDefault
enabledbool–

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.SetOverrideVoice(true)

ClearOverrideVoice​

void ClearOverrideVoice()

Clear the overriding voice.

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.ClearOverrideVoice()

SetOverrideVideo​

void SetOverrideVideo(bool enabled)

Parameters

NameTypeDefault
enabledbool–

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.SetOverrideVideo(true)

ClearOverrideVideo​

void ClearOverrideVideo()

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.SetOverrideVideo(true)

AddAuthVoiceUser​

void AddAuthVoiceUser(uint userID)

Add a user to AuthVoiceUser by his ID.

Parameters

NameTypeDefault
userIDuint–

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.AddAuthVoiceUser(000000000)

RemoveAuthVoiceUser​

void RemoveAuthVoiceUser(uint userID)

Remove a user from AuthVoiceUser by his ID.

Parameters

NameTypeDefault
userIDuint–

Returns

void

Example

Lua
lSpace.Host.ExecutingObject.VoiceZone.RemoveAuthVoiceUser(000000000)

AddAuthVideoUser​

void AddAuthVideoUser(uint userID)

Parameters

NameTypeDefault
userIDuint–

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.AddAuthVideoUser(000000000)

RemoveAuthVideoUser​

void RemoveAuthVideoUser(uint userID)

Remove a user from AuthVoiceUser by his ID.

Parameters

NameTypeDefault
userIDuint–

Returns

void

Example

Lua
Space.Host.ExecutingObject.VoiceZone.RemoveAuthVideoUser(000000000)

Properties​

Enabled​

bool Enabled {get; set; }

Whether the Voice Zone component is Enabled

Example

Lua
Space.Host.ExecutingObject.VoiceZone.Enabled = true
Lua
--clicking this object will Enable/Disable it's Voice Zone component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.VoiceZone

OnClick = function()
component.Enabled = not component.Enabled
end

thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)

AllowVoice​

bool AllowVoice {get; set; }

Whether allows voice.

Example

Lua
Space.Host.ExecutingObject.VoiceZone.AllowVoice = true

AllowVideo​

bool AllowVideo {get; set; }

Whether allows video.

Example

Lua
Space.Host.ExecutingObject.VoiceZone.AllowVideo = true

ConnectVoiceService​

bool ConnectVoiceService {get; set; }

Example

Lua
Space.Host.ExecutingObject.VoiceZone.ConnectVoiceService = true

ConnectVideoService​

bool ConnectVideoService {get; set; }

Example

Lua
Space.Host.ExecutingObject.VoiceZone.ConnectVideoService = true

PriorityRead only​

int Priority {get; }

The priority of the voice zone

Example

Lua
priority = Space.Host.ExecutingObject.VoiceZone.Priority

AreaNameRead only​

string AreaName {get; }

The name of area.

Example

Lua
priority = Space.Host.ExecutingObject.VoiceZone.AreaName

SpatializedRead only​

bool Spatialized {get; }

Whether the voice zone is spatialized.

Example

Lua
isSpatialized = Space.Host.ExecutingObject.VoiceZone.Spatialized

SpatialDropoffRead only​

bool SpatialDropoff {get; }

Whether the voice zone is spatialized drop off.

Example

Lua
spatialDropoff = Space.Host.ExecutingObject.VoiceZone.SpatialDropoff

SpatialStereoRead only​

bool SpatialStereo {get; }

Whether the voice zone is spatial stereo.

Example

Lua
spatialStereo = Space.Host.ExecutingObject.VoiceZone.SpatialStereo

SpatialDistanceRead only​

float SpatialDistance {get; }

The spatial distance of the voice zone.

Example

Lua
floatDistance = Space.Host.ExecutingObject.VoiceZone.SpatialDistance

GlobalRead only​

bool Global {get; }

Whether the voice zone is global.

Example

Lua
isGlobal = Space.Host.ExecutingObject.VoiceZone.Global

AuthVideoUsersRead only​

uint[] AuthVideoUsers {get; }

Return an array of auth video user.

Example

Lua
tableAuthVideoUsers = Space.Host.ExecutingObject.VoiceZone.AuthVideoUsers

AuthVoiceUsersRead only​

uint[] AuthVoiceUsers {get; }

Example

Lua
tableAuthVideoUsers = Space.Host.ExecutingObject.VoiceZone.AuthVoiceUsers

GameObjectRead only​

SGameObject GameObject {get; }

Example

Lua
theGameObject = Space.Host.ExecutingObject.VoiceZone.GameObject