Skip to content

GEMLibrary

← Back to Runtime | Home

Namespace: wevr.GEM.Runtime

Type: Class

Description

Library of functions for GEM that are used by multiple scripts.

Nested Types

  • GemAddress

Methods

Contains

static bool Contains(this Bounds bounds, Vector2 position, Transform transform)

ContainsRelativeVector2

static bool ContainsRelativeVector2(this Bounds bounds, Vector2 relativePos)

DiscoverGemServerAsync

static async Task< GemAddress > DiscoverGemServerAsync(CancellationTokenSource cts, int discoveryPort, int retryIntervalMs=1000, int timeoutMs=10000)

GenerateMesh

static GameObject GenerateMesh(Vector2[] points2D, Transform parent, string name, Material material, float heightAboveBelow=10f)

GetAvailablePortsAsync

static async Task< int > GetAvailablePortsAsync(CancellationTokenSource tokenSource)

GetCommandLineArg

static bool GetCommandLineArg(string keyword, out string value, bool ignoreCase=true)

GetMainLocalIPv4

static string GetMainLocalIPv4()

LaunchBatFile

static void LaunchBatFile(string relativeFilePath, string arguments)

ParseArgToVector2

static bool ParseArgToVector2(string arg, out Vector2 result)

TryHttpPingAsync

static async Task< bool > TryHttpPingAsync(string url, CancellationTokenSource ctsIn=null, int intervalMs=1000, int timeoutMs=60000)

TryPingGemServer

static async Task< bool > TryPingGemServer(CancellationTokenSource ctsIn=null, int intervalMs=1000, int timeoutMs=60000)