跳到主要内容

Class Runtime

The runtime for Unity.

Events

onInitialized

Called when runtime initialization completed.

public event Action onInitialized;

Properties

multithreadingEnabled

This property indicates whether the framework enables multithreading.

If the property is true, the framework uses new threads to process time-consuming functions as much as possible; otherwise, all functions run on the main thread.

On some platforms that do not support multithreading(such as WebGL), this property should be set to false.

public static bool multithreadingEnabled { get; set; }

initialized

Is runtime initialized?

public static bool initialized { get; private set; }

persistentDataDirectory

public static string persistentDataDirectory { get; }

initializationTask

public static Task initializationTask { get; }

render

Render module.

public static Render render { get; private set; }

device

Device module.

public static Device device { get; private set; }

eventSystem

Event system module.

public static EventSystem eventSystem { get; private set; }

Methods

Initialize()

Initializes the runtime.

public static Task Initialize()

GetModule<T>()

Get module of type T.

public static T GetModule<T>()