(Created page with "=Properties= {{ScriptFunction|bool|Enabled|{get; set;}|Enabled Behaviors are Updated; disabled Behaviors are not.|5= local voiceZone=Space.Host.GetReference("VoiceZone").Voic...") |
|||
Line 1: | Line 1: | ||
=Properties= | =Properties= | ||
− | {{ScriptFunction|bool|Enabled|{get; set;}|Enabled | + | {{ScriptFunction|bool|Enabled|{get; set;}|Whether the Voice Zone component is Enabled or not|5= |
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br> | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br> | ||
− | Space.Log(voiceZone.Enabled) | + | Space.Log(voiceZone.Enabled) |6=<pre>--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)</pre> | ||
}} | }} | ||
Whether the Voice Zone component is Enabled or not
--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)
Whether allows voice.
Whether allows video.
The priority of the voice zone
The name of area.
Whether the voice zone is spatialized.
Whether the voice zone is spatialized drop off.
Whether the voice zone is spatial stereo.
The spatial distance of the voice zone.
Whether the voice zone is global.
Set voice to override the original voice.
local voiceZone=thisObject.Children[0].VoiceZone
function Play()
voiceZone.SetOverrideVoice(true)
Clear the overriding voice.
local voiceZone=thisObject.Children[0].VoiceZone
function Clear()
voiceZone.ClearOverrideVoice()
Return an array of auth video user.
local voiceZone=thisObject.Children[0].VoiceZone
local userVideo = voiceZone.AuthVideoUsers
for i=1,#userVideo do
Space.Log(userVideo[i])
Add a user to AuthVoiceUser by his ID.
local voiceZone=thisObject.Children[0].VoiceZone
function Add()
local id=111;
voiceZone.AddAuthVoiceUser(id)
Remove a user from AuthVoiceUser by his ID.
local voiceZone=thisObject.Children[0].VoiceZone
function Remove()
local id=111;
voiceZone.RemoveAuthVoiceUser(id)
|