ClientUtils

Summary

Methods

Method Returns
GetCameraTransform() LinearTransform | nil
WorldToScreen(worldPos: Vec3) Vec2 | nil
ScreenToWorld(mousePos: Vec2) Vec3 | nil
GetWindowSize() Vec2 | nil
PopScreen(graphAsset: DataContainer, screensToPop: int) bool
ConnectToServer(serverGuid: Guid, password: string = “") void
SpectateServer(serverGuid: Guid, password: string = “") void
SetSquadAutoJoining(shouldJoinSquad: bool) void

Methods

GetCameraTransform

GetCameraTransform(): LinearTransform | nil

Returns

Type Description
LinearTransform | nil

WorldToScreen

WorldToScreen(worldPos: Vec3): Vec2 | nil

Parameters

Name Type Description
worldPos Vec3

Returns

Type Description
Vec2 | nil

ScreenToWorld

ScreenToWorld(mousePos: Vec2): Vec3 | nil

Parameters

Name Type Description
mousePos Vec2

Returns

Type Description
Vec3 | nil

GetWindowSize

GetWindowSize(): Vec2 | nil

Returns

Type Description
Vec2 | nil

PopScreen

PopScreen(graphAsset: DataContainer, screensToPop: int): bool

Parameters

Name Type Description
graphAsset DataContainer The UIGraphAsset of the screen to pop.
screensToPop int The number of screens to pop.

Returns

Type Description
bool

ConnectToServer

ConnectToServer(serverGuid: Guid, password: string = “")

Parameters

Name Type Description
serverGuid Guid The GUID of the server to connect to.
password string The password to use when trying to connect to a password-protected server.

SpectateServer

SpectateServer(serverGuid: Guid, password: string = “")

Parameters

Name Type Description
serverGuid Guid The GUID of the server to connect to as a spectator.
password string The password to use when trying to connect to a password-protected server.

SetSquadAutoJoining

SetSquadAutoJoining(shouldJoinSquad: bool)

Parameters

Name Type Description
shouldJoinSquad bool