Skip to main content

PlatformDefines

A static class in Root.Township, the global namespace.

The scripting define symbols used when building for each platform (Linux, Windows, Quest, Pico).

Fields​

4 private and internal fields
MemberWhat it is
private static readonly string[] baseDefinesDefines every platform gets, such as __MEGASPLAT__ and TextMeshPro. Linux uses only these.
private static readonly string[] picoDefinesBase defines plus UNITY_PICO.
private static readonly string[] questDefinesBase defines plus UNITY_QUEST and OVR_PLATFORM_ASYNC_MESSAGES.
private static readonly string[] windowsDefinesBase defines plus UNITY_XR_MANAGEMENT.

Methods​

MemberWhat it is
static string[] GetDefines(PlatformFlags runtime)Returns the define list for a platform, from PlatformFlags or its name. Throws for anything else.
static string[] GetDefines(string runtimeAsString)Returns the define list for a platform, from PlatformFlags or its name. Throws for anything else.