Skip to main content

Client

Client

Client Only

This class is only available on client

Methods​

integer GetID()​

nil OpenScriptFile(string fileName, integer? lineNumber)​

nil OpenMontageScriptFile(string fileName, integer? lineNumber)​

string GetMontageURL()​

boolean NeedsRestartToOpen(string url)​

nil SetMontageURL(string url)​

nil LoadMontageByURL()​

nil CancelLoadMontageByURL()​

string GetMontageURLBase()​

table GetMontageURLParameters()​

string GetMontageURLParametersRaw()​

string GetMontageURLWithParameters(table params)​

nil ConnectToMontage(string url)​

string GetConnectionStatus()​

Unknown, Connecting, FailedToConnect, StatusMessage, ReadyToAcknowledge, Connected, Disconnected

string GetConnectionStatusDetailed()​

string GetEngineMismatchUrl()​

nil Disconnect(string? reason)​

integer GetPing()​

Time for a network message to travel from client to server and back

integer GetSceneMsgsInQueue()​

boolean IsInitialAssetSyncDone()​

table GetMainDispatcherStats()​

table GetRenderStats()​

table GetRenderStatsWrites()​

boolean GetRenderStatsEnabled()​

nil SetRenderStatsEnabled(boolean enable)​

nil SignIn()​

nil SignOut()​

string GetAuthStatus()​

string GetAuthPrompt()​

string GetAuthError()​

string StartAISession()​

boolean opened OpenFolder(string path)​

nil ClearSky()​

nil SetSkyEnabled(boolean enabled)​

boolean GetSkyEnabled()​

table GetSkyInfo()​

boolean GetNetworkThrottlingNow()​

nil SetIntersectionTint(Color color)​

nil SetIntersectionBox(Vec3 centerWC, Quat rot, Vec3 sizeWC)​

nil SetIntersectionSphere(Vec3 posWC, number radius)​

nil WriteToScreen(string text, Vec2 pos, Vec2 anchor, Color color, integer? size, Color? outlineColor, number? time, number? outlineWidth)​

nil CloseApp()​

string GetEULA()​

Vec2 GetWindowSize()​

Vec2 GetViewportSize()​

Vec2 GetRenderSize()​

Vec2 GetViewportPos()​

boolean IsAppVisible()​

string CaptureObjectThumbnail(Object target, table? opts)​

Color GetBGColor()​

nil SetBGColor(Color|Vec4 color)​

boolean GetVREnabled()​

nil SetVREnabled(boolean enable, string vrDevice)​

nil ToggleVREnabled(string vrDevice)​

Vec3 pos, Quat rot GetVREyeTransform(integer side, Space space)​

Vec3 pos, Quat rot GetVRHeadsetTransform(Space space)​

nil ApplyVRHapticFeedback(Side hand, number duration, number frequency, number amplitude)​

boolean GetVREyeTrackingSupported()​

number scale SetVRUserScale(number scale)​

number GetVRUserScale()​

number GetVRUserScaleMin()​

number GetVRUserScaleMax()​

nil StartVRPassthrough()​

nil StopVRPassthrough()​

boolean IsVRPassthroughEnabled()​

boolean IsVRPassthroughSupported()​

boolean IsUploadingFiles()​

boolean IsDownloadingFiles()​

string GetDragDropBlockedReason()​

nil Restart()​

nil ToggleChannelRendering()​

integer GetRenderChannelsCount()​

number GetRenderChannelOpacity(integer which)​

nil SetRenderChannelOpacity(integer which, number value)​

boolean IsMobile()​

integer GetMemoryUsage()​

integer? GetMemoryLimit()​

string GetCredits()​

table GetErrors()​

table GetShaderErrors()​

nil SetVPuzzleShaderDefines(string defines)​

nil RequestReloadShaders()​

nil CopyToClipboard(string text)​

string GetClipboardText()​

may not work on all platforms

nil OpenBrowserWithURL(string url)​

nil HttpGet(string url, fun(success:boolean, response:string, statusCode:integer) onResponse)​

nil HttpDownload(string url, string fileName, fun(success:boolean, response:string, statusCode:integer, asset:Asset?) onResponse)​

nil HttpDownloadToClientCache(string url, string fileName, fun(success:boolean, response:string, statusCode:integer, asset:Asset?) onResponse)​

nil ReleaseClientCacheResources()​

nil ReloadPage(boolean fromCache)​

nil ResetPlayerLODPriorityBubble()​

nil AddPlayerLODPriorityBubbleShape(Vec3 capsulePointA, Vec3 capsulePointB, number capsuleRadius, Vec3 velocity, number size)​

LODs in this bubble are prioritized, should be placed around the player or camera params: capsuleStart, capsuleEnd, capsuleRadius, velocity, size

nil SetScreenColor(Color color, boolean? permanent)​

Tint the view for this frame or permanently

nil EnableRenderingWithFadeEffect(integer type, number duration)​

nil DisableRenderingWithFadeEffect(integer type, number duration)​

nil ToggleRenderingWithFadeEffect(integer type, number duration)​

nil SetOutlineColor(Vec4 color)​

nil SetHighlightColor(Vec4 color)​

nil DrawPointSpriteSphere(Vec3 pos, number radius, Vec4 color, boolean shade)​

nil DrawBillboardSphere(Vec3 pos, number radius, Vec4 color, boolean shade)​

Draw a sphere sprite at a world position, optionally shaded. Client-side, call every frame.

nil DrawBillboard(integer texture, Vec3 pos, number size, Vec4 color, number angleDeg)​

Draw a camera-facing textured quad in world space. Client-side, call every frame.

nil DrawBillboards(table billboards)​

Batch-draw multiple billboards from a table of descriptors.

Properties​

ClientPermission permission​