Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by AMP · Dec 18, 2009 at 06:31 PM · preprocessor

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by jashan · Dec 18, 2009 at 08:24 PM

No, currently there are no others.

See also:

  • Editor: Conditional Script Compilation Based on Platform
  • Editor: Interface for listing preprocessor macros (#define) in build settings
  • Unity C# preprocessor
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
4
Best Answer

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AMP · Nov 22, 2010 at 07:39 AM 0
Share

Slightly broken link. http://unity3d.com/support/documentation/$$anonymous$$anual/Platform%20Dependent%20Compilation.html

avatar image yoyo · Nov 22, 2010 at 05:09 PM 0
Share

Oops, sorry -- I just fixed it.

avatar image
1

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...

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Setting Scroll View Width GUILayout 1 Answer

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Is there a way to have debug code compiled out for a final build? 5 Answers

Material doesn't have a color property '_Color' 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges