SVoiceZone
客户端组件
在此类中SetOverrideVoice
- 函数
- Set
Override Voice - Clear
Override Voice - Set
Override Video - Clear
Override Video - Add
Auth Voice User - Remove
Auth Voice User - Add
Auth Video User - Remove
Auth Video User - 属性
- Enabled
- Allow
Voice - Allow
Video - Connect
Voice Service - Connect
Video Service - Priority
- Area
Name - Spatialized
- Spatial
Dropoff - Spatial
Stereo - Spatial
Distance - Global
- Auth
Video Users - Auth
Voice Users - Game
Object
成员 23
| 函数 | SetOverrideVoice | Set voice to override the original voice. |
| 函数 | ClearOverrideVoice | Clear the overriding voice. |
| 函数 | SetOverrideVideo | – |
| 函数 | ClearOverrideVideo | – |
| 函数 | AddAuthVoiceUser | Add a user to AuthVoiceUser by his ID. |
| 函数 | RemoveAuthVoiceUser | Remove a user from AuthVoiceUser by his ID. |
| 函数 | AddAuthVideoUser | – |
| 函数 | RemoveAuthVideoUser | Remove a user from AuthVoiceUser by his ID. |
| 属性 | Enabled | Whether the Voice Zone component is Enabled |
| 属性 | AllowVoice | Whether allows voice. |
| 属性 | AllowVideo | Whether allows video. |
| 属性 | ConnectVoiceService | – |
| 属性 | ConnectVideoService | – |
| 属性 | Priority | The priority of the voice zone |
| 属性 | AreaName | The name of area. |
| 属性 | Spatialized | Whether the voice zone is spatialized. |
| 属性 | SpatialDropoff | Whether the voice zone is spatialized drop off. |
| 属性 | SpatialStereo | Whether the voice zone is spatial stereo. |
| 属性 | SpatialDistance | The spatial distance of the voice zone. |
| 属性 | Global | Whether the voice zone is global. |
| 属性 | AuthVideoUsers | Return an array of auth video user. |
| 属性 | AuthVoiceUsers | – |
| 属性 | GameObject | – |
函数
SetOverrideVoice
void SetOverrideVoice(bool enabled)
Set voice to override the original voice.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| enabled | bool | – |
返回值
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)
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| enabled | bool | – |
返回值
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.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| userID | uint | – |
返回值
void
示例
Lua
Space.Host.ExecutingObject.VoiceZone.AddAuthVoiceUser(000000000)
RemoveAuthVoiceUser
void RemoveAuthVoiceUser(uint userID)
Remove a user from AuthVoiceUser by his ID.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| userID | uint | – |
返回值
void
示例
Lua
lSpace.Host.ExecutingObject.VoiceZone.RemoveAuthVoiceUser(000000000)
AddAuthVideoUser
void AddAuthVideoUser(uint userID)
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| userID | uint | – |
返回值
void
示例
Lua
Space.Host.ExecutingObject.VoiceZone.AddAuthVideoUser(000000000)
RemoveAuthVideoUser
void RemoveAuthVideoUser(uint userID)
Remove a user from AuthVoiceUser by his ID.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| userID | uint | – |
返回值
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只读
示例
Lua
theGameObject = Space.Host.ExecutingObject.VoiceZone.GameObject



