PlatformInfo

Description

The PlatformInfo API provides information about the computer and controllers being used.

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Methods

Name Return Value Summary
getCPUBrand string Gets information on the CPU.
getGraphicsCardType string Gets the graphics card type.
getInstance None

Deprecated: This function is deprecated and will be removed.

getNumLogicalCores number Gets the number of logical CPU cores.
getOperatingSystemType string Gets the operating system type.
getTotalSystemMemoryMB number Returns the total system memory in megabytes.
has3DHTML boolean Checks whether HTML on 3D surfaces (e.g., Web entities) is supported.
hasRiftControllers boolean Checks whether Oculus Touch controllers are connected.
hasViveControllers boolean Checks whether Vive controllers are connected.
isStandalone boolean Checks whether Interface is running on a stand-alone HMD device (CPU incorporated into the HMD display).

Method Details

(static) getCPUBrand( ) → {string}
Returns: Information on the CPU.

Gets information on the CPU.

Example

Report the CPU being used.

print("CPU: " + PlatformInfo.getCPUBrand());
// Example: Intel(R) Core(TM) i7-7820HK CPU @ 2.90GHz
(static) getGraphicsCardType( ) → {string}
Returns: The graphics card type.

Gets the graphics card type.

(static) getInstance( )

Deprecated: This function is deprecated and will be removed.

(static) getNumLogicalCores( ) → {number}
Returns: The number of logical CPU cores.

Gets the number of logical CPU cores.

(static) getOperatingSystemType( ) → {string}
Returns: "WINDOWS", "MACOS", or "UNKNOWN".

Gets the operating system type.

(static) getTotalSystemMemoryMB( ) → {number}
Returns: The total system memory in megabytes.

Returns the total system memory in megabytes.

(static) has3DHTML( ) → {boolean}
Returns: true if the current display supports HTML on 3D surfaces, false if it doesn't.

Checks whether HTML on 3D surfaces (e.g., Web entities) is supported.

(static) hasRiftControllers( ) → {boolean}
Returns: true if Oculus Touch controllers are connected, false if they aren't.

Checks whether Oculus Touch controllers are connected.

(static) hasViveControllers( ) → {boolean}
Returns: true if Vive controllers are connected, false if they aren't.

Checks whether Vive controllers are connected.

(static) isStandalone( ) → {boolean}
Returns: true if Interface is running on a stand-alone device, false if it isn't.

Checks whether Interface is running on a stand-alone HMD device (CPU incorporated into the HMD display).