- Home /
What C# predefines are recognized by Unity?
I've tried looking through the Unity documentation, and I have yet to find a listing of C# predefines that Unity recognizes. Reading through the forums and such, I've found UNITY_IPHONE is recognized in Unity iPhone, and I think DEBUG is also recognized in general. Are there any others?
Answer by jashan · Dec 18, 2009 at 08:24 PM
No, currently there are no others.
See also:
Answer by yoyo · Nov 16, 2010 at 01:06 AM
With Unity 3.0 comes a new answer: http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html
Answer by Jaap Kreijkamp · Dec 20, 2009 at 11:33 PM
UNITY_2_6
and UNITY_2_6_1
are also defined on the right platform, so there are more. I agree a complete listing would be useful (I didn't know about the UNITY_IPHONE
so I used UNITY_2_6
but I guess that won't hold when Unity 2.7 is released...
Answer by IgorAherne · Feb 01, 2017 at 05:39 PM
Here are some
-define:UNITY_5_3_OR_NEWER
-define:UNITY_5_4_OR_NEWER
-define:UNITY_5_5_OR_NEWER
-define:UNITY_5_5_0
-define:UNITY_5_5
-define:UNITY_5
-define:UNITY_PURCHASING
-define:UNITY_ANALYTICS
-define:ENABLE_AUDIO
-define:ENABLE_CACHING
-define:ENABLE_CLOTH
-define:ENABLE_GENERICS
-define:ENABLE_MICROPHONE
-define:ENABLE_MULTIPLE_DISPLAYS
-define:ENABLE_PHYSICS
-define:ENABLE_SPRITERENDERER_FLIPPING
-define:ENABLE_SPRITES
-define:ENABLE_TERRAIN
-define:ENABLE_RAKNET
-define:ENABLE_UNET
-define:ENABLE_LZMA
-define:ENABLE_UNITYEVENTS
-define:ENABLE_WEBCAM
-define:ENABLE_WWW
-define:ENABLE_CLOUD_SERVICES_COLLAB
-define:ENABLE_CLOUD_SERVICES_ADS
-define:ENABLE_CLOUD_HUB
-define:ENABLE_CLOUD_PROJECT_ID
-define:ENABLE_CLOUD_SERVICES_UNET
-define:ENABLE_CLOUD_SERVICES_BUILD
-define:ENABLE_CLOUD_LICENSE
-define:ENABLE_EDITOR_METRICS
-define:ENABLE_EDITOR_METRICS_CACHING
-define:INCLUDE_DYNAMIC_GI
-define:INCLUDE_GI
-define:PLATFORM_SUPPORTS_MONO
-define:INCLUDE_PUBNUB
-define:ENABLE_PLAYMODE_TESTS_RUNNER
-define:ENABLE_SCRIPTING_NEW_CSHARP_COMPILER
-define:UNITY_ANDROID
-define:ENABLE_SUBSTANCE
-define:UNITY_ANDROID_API
-define:ENABLE_EGL
-define:ENABLE_NETWORK
-define:ENABLE_RUNTIME_GI
-define:ENABLE_CRUNCH_TEXTURE_COMPRESSION
-define:ENABLE_UNITYWEBREQUEST
-define:ENABLE_CLOUD_SERVICES
-define:ENABLE_CLOUD_SERVICES_ANALYTICS
-define:ENABLE_CLOUD_SERVICES_PURCHASING
-define:ENABLE_CLOUD_SERVICES_CRASH_REPORTING
-define:PLATFORM_SUPPORTS_ADS_ID
-define:UNITY_CAN_SHOW_SPLASH_SCREEN
-define:ENABLE_VIDEO
-define:ENABLE_VR
-define:ENABLE_UNITYADS_RUNTIME
-define:UNITY_UNITYADS_API
-define:ENABLE_MONO
-define:CROSS_PLATFORM_INPUT
-define:MOBILE_INPUT