Properties
Enabled
Whether the Voice Zone component is Enabled or not
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Enabled)
--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.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AllowVoice)
AllowVideo
bool AllowVideo
{get; set;}
Whether allows video.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AllowVideo)
Priority
The priority of the voice zone
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Priority)
AreaName
The name of area.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AreaName)
Spatialized
Whether the voice zone is spatialized.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Spatialized)
SpatialDropoff
bool SpatialDropoff
{get;}
Whether the voice zone is spatialized drop off.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialDropoff)
SpatialStereo
bool SpatialStereo
{get;}
Whether the voice zone is spatial stereo.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialStereo)
SpatialDistance
float SpatialDistance
{get;}
The spatial distance of the voice zone.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialDistance)
Global
Whether the voice zone is global.
local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Global)
Members
SetOverrideVoice
void SetOverrideVoice
(bool enabled);
Set voice to override the original voice.
local thisObject=Space.Host.ExecutingObject
local voiceZone=thisObject.Children[0].VoiceZone
function Play()
voiceZone.SetOverrideVoice(true)
end
ClearOverrideVoice
void ClearOverrideVoice
();
Clear the overriding voice.
local thisObject=Space.Host.ExecutingObject
local voiceZone=thisObject.Children[0].VoiceZone
function Clear()
voiceZone.ClearOverrideVoice()
end
AuthVideoUsers
uint AuthVideoUsers
{get;}
Return an array of auth video user.
local thisObject=Space.Host.ExecutingObject
local voiceZone=thisObject.Children[0].VoiceZone
local userVideo = voiceZone.AuthVideoUsers
for i=1,#userVideo do
Space.Log(userVideo[i])
end
AddAuthVoiceUser
void AddAuthVoiceUser
(uint userID)
Add a user to AuthVoiceUser by his ID.
local thisObject=Space.Host.ExecutingObject
local voiceZone=thisObject.Children[0].VoiceZone
function Add()
local id=111;
voiceZone.AddAuthVoiceUser(id)
end
RemoveAuthVoiceUser
void RemoveAuthVoiceUser
(uint userID)
Remove a user from AuthVoiceUser by his ID.
local thisObject=Space.Host.ExecutingObject
local voiceZone=thisObject.Children[0].VoiceZone
function Remove()
local id=111;
voiceZone.RemoveAuthVoiceUser(id)
end
Scripting Portal
|
|
Common
|
|
|
Key Classes
|
|
|
Helper Classes
|
|
|
Scripting samples and tutorials
|
|
|