Scripting API

Application

static class in UnityEngine · UnityEngine.CoreModule

33 of 53 of Unity's membersUnity's documentation
In Tassix

The running application: paths, product identity, frame rate and quitting. Paths follow Unity's layout: dataPath is a Unity project's Assets folder, else the folder of the first scene; persistentDataPath is LocalLow/companyName/productName (TASSIX_PERSISTENT_DATA_PATH overrides it).

Properties 28

static ThreadPriority backgroundLoadingPriority { get; set; }
static string companyName { get; }
static string consoleLogPath { get; }
static string dataPath { get; }

A Unity project's Assets folder, else the first scene's folder.

static bool genuine { get; }
static bool genuineCheckAvailable { get; }
static string identifier { get; }
static NetworkReachability internetReachability { get; }
static bool isBatchMode { get; }

Whether the game runs without a window (headless players, tools), as Unity's -batchmode.

static bool isConsolePlatform { get; }
static bool isEditor { get; }
static bool isFocused { get; }
static bool isLoadingLevel { get; }
static bool isMobilePlatform { get; }
static bool isPlaying { get; }
static int levelCount { get; }
static int loadedLevel { get; }
static string loadedLevelName { get; }
static string persistentDataPath { get; }
static RuntimePlatform platform { get; }
static string productName { get; }
static bool runInBackground { get; set; }
static string streamingAssetsPath { get; }
static SystemLanguage systemLanguage { get; }
static int targetFrameRate { get; set; }

-1 means the platform default (vsync).

static string temporaryCachePath { get; }
static string unityVersion { get; }

The Unity version scripts are written against.

static string version { get; }

Methods 10

static bool CanStreamedLevelBeLoaded(string levelName)
static bool CanStreamedLevelBeLoaded(int levelIndex)
static StackTraceLogType GetStackTraceLogType(LogType logType)
static bool HasProLicense()

False, as Unity 6's players report.

static void LoadLevel(int index)
static void LoadLevel(string name)
static void LoadLevelAdditive(int index)
static void LoadLevelAdditive(string name)
static AsyncOperation? LoadLevelAdditiveAsync(int index)
static AsyncOperation? LoadLevelAdditiveAsync(string levelName)
static AsyncOperation? LoadLevelAsync(int index)
static AsyncOperation? LoadLevelAsync(string levelName)
static void OpenURL(string url)

Not opened: the engine doesn't launch other programs on a script's behalf.

static void Quit()
static void Quit(int exitCode)

Asks the host to quit after this frame (quitting handlers may refuse via wantsToQuit).

static void SetStackTraceLogType(LogType logType, StackTraceLogType stackTraceType)

Kept for scripts that set it; the engine's logs carry managed stacks either way.

Events 5

static event Action<bool>? focusChanged
static event LogCallback? logMessageReceived
static event LogCallback? logMessageReceivedThreaded
static event Action? quitting
static event Func<bool>? wantsToQuit

Not in Tassix yet 20

(constructor) GetStackTraceLogType HasUserAuthorization IsPlaying RequestAdvertisingIdentifierAsync RequestUserAuthorization SetStackTraceLogType Unload absoluteURL buildGUID cloudProjectId deepLinkActivated exitCancellationToken installMode installerName lowMemory memoryUsageChanged onBeforeRender sandboxType unloading

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.