Breakroom is now Sinewave Campus. Book a meeting

SVoiceZone

客户端组件
在此类中SetOverrideVoice
  1. 函数
  2. SetOverrideVoice
  3. ClearOverrideVoice
  4. SetOverrideVideo
  5. ClearOverrideVideo
  6. AddAuthVoiceUser
  7. RemoveAuthVoiceUser
  8. AddAuthVideoUser
  9. RemoveAuthVideoUser
  10. 属性
  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
成员 23
函数SetOverrideVoiceSet voice to override the original voice.
函数ClearOverrideVoiceClear the overriding voice.
函数SetOverrideVideo–
函数ClearOverrideVideo–
函数AddAuthVoiceUserAdd a user to AuthVoiceUser by his ID.
函数RemoveAuthVoiceUserRemove a user from AuthVoiceUser by his ID.
函数AddAuthVideoUser–
函数RemoveAuthVideoUserRemove a user from AuthVoiceUser by his ID.
属性EnabledWhether the Voice Zone component is Enabled
属性AllowVoiceWhether allows voice.
属性AllowVideoWhether allows video.
属性ConnectVoiceService–
属性ConnectVideoService–
属性PriorityThe priority of the voice zone
属性AreaNameThe name of area.
属性SpatializedWhether the voice zone is spatialized.
属性SpatialDropoffWhether the voice zone is spatialized drop off.
属性SpatialStereoWhether the voice zone is spatial stereo.
属性SpatialDistanceThe spatial distance of the voice zone.
属性GlobalWhether the voice zone is global.
属性AuthVideoUsersReturn an array of auth video user.
属性AuthVoiceUsers–
属性GameObject–

函数​

SetOverrideVoice​

void SetOverrideVoice(bool enabled)

Set voice to override the original voice.

参数

名称类型默认值
enabledbool–

返回值

void

示例

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

ClearOverrideVoice​

void ClearOverrideVoice()

Clear the overriding voice.

返回值

void

示例

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

SetOverrideVideo​

void SetOverrideVideo(bool enabled)

参数

名称类型默认值
enabledbool–

返回值

void

示例

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

ClearOverrideVideo​

void ClearOverrideVideo()

返回值

void

示例

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

AddAuthVoiceUser​

void AddAuthVoiceUser(uint userID)

Add a user to AuthVoiceUser by his ID.

参数

名称类型默认值
userIDuint–

返回值

void

示例

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

RemoveAuthVoiceUser​

void RemoveAuthVoiceUser(uint userID)

Remove a user from AuthVoiceUser by his ID.

参数

名称类型默认值
userIDuint–

返回值

void

示例

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

AddAuthVideoUser​

void AddAuthVideoUser(uint userID)

参数

名称类型默认值
userIDuint–

返回值

void

示例

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

RemoveAuthVideoUser​

void RemoveAuthVideoUser(uint userID)

Remove a user from AuthVoiceUser by his ID.

参数

名称类型默认值
userIDuint–

返回值

void

示例

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

属性​

Enabled​

bool Enabled {get; set; }

Whether the Voice Zone component is Enabled

示例

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.

示例

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

AllowVideo​

bool AllowVideo {get; set; }

Whether allows video.

示例

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

ConnectVoiceService​

bool ConnectVoiceService {get; set; }

示例

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

ConnectVideoService​

bool ConnectVideoService {get; set; }

示例

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

Priority只读​

int Priority {get; }

The priority of the voice zone

示例

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

AreaName只读​

string AreaName {get; }

The name of area.

示例

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

Spatialized只读​

bool Spatialized {get; }

Whether the voice zone is spatialized.

示例

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

SpatialDropoff只读​

bool SpatialDropoff {get; }

Whether the voice zone is spatialized drop off.

示例

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

SpatialStereo只读​

bool SpatialStereo {get; }

Whether the voice zone is spatial stereo.

示例

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

SpatialDistance只读​

float SpatialDistance {get; }

The spatial distance of the voice zone.

示例

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

Global只读​

bool Global {get; }

Whether the voice zone is global.

示例

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

AuthVideoUsers只读​

uint[] AuthVideoUsers {get; }

Return an array of auth video user.

示例

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

AuthVoiceUsers只读​

uint[] AuthVoiceUsers {get; }

示例

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

GameObject只读​

SGameObject GameObject {get; }

示例

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