Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateGraphicsDevice(string, string)

Creates the main API object. Call this method only once in your application.
Read time 1 minuteLast updated 11 days ago

Definition

public static GraphicsDevice CreateGraphicsDevice(string projectID, string appDir)

Parameters

projectID

The projectID of the Unity project. Only the first call to this function uses this ID.

appDir

Specifies the directory in which the NVIDIA DLLS are located at. When not used, the system will locate the DLLs right next to the executable of the editor.

Returns

Type

Description

GraphicsDeviceThe Device API object to access NVIDIA features. If you call this function again, the function returns the same device, regardless of whether you pass in a different projectID.

Remarks

This function will instantiate the GraphicsDevice. It's safe to execute at any point when the application is alive. Since the device is a direct representation of the hardware graphics card, this method returns the same device if you call it again. If you pass in an appDir or projectID, only the first call to this method instantiates the device object using these parameters.