Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
1
Question by TimK.Disney · Feb 20, 2014 at 08:47 PM · monodevelopunity4.3define

MonoDevelop no longer getting global Unity defines

Just today I have encountered a really weird problem that I have never seen before. It looks as though when Unity builds the project/solution files for MonoDevelop, it's not inserting any of the expected global #defines -- for example, UNITY_EDITOR or UNITY_4_3. As you might expect, this led to our codebase suddenly ceasing to compile in MonoDevelop (although the project would compile and run just fine in the Unity editor itself).

I managed to work around the problem by manually adding those #defines to the project settings, but that seems to me to be extremely fragile and prone to creating future problems. For instance, if I build to device, does the Unity project use the C# project settings to compile my scripts? Doesn't seem like a good idea to define UNITY_EDITOR on device. Further, I expect that the next time I happen to regenerate the project files, those hand-crafted settings will get stomped and my game won't build again.

Anyone have any idea how this stuff gets inserted into the project by Unity? And, for bonus points, whether the build workflow relies on these project settings in any way.

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

1 Reply

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

Answer by TimK.Disney · Mar 19, 2014 at 05:54 PM

Just discovered the answer to this problem today, with the help of a sharp-eyed coworker: I had somehow inadvertently set MonoDevelop into Release mode, and those defines are not part of the project in that mode, apparently. Switching back to Debug mode fixed the problem.

Comment
Add comment · Show 4 · 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 Meatgrind · Jun 22, 2015 at 02:05 PM 0
Share

I had the same problem too. Tim$$anonymous$$.Disney's answer worked 100%!

I'd like to add that the same problem also causes PlayerSettings custom defines not being visible to IntelliSense in $$anonymous$$onoDevelop in addition to Unity's automatic global defines for active platform etc.

avatar image szimmermann · Oct 29, 2015 at 01:50 PM 0
Share

I just had the same problem. You saved my day. Thank you!!

avatar image NWUdacity · Dec 19, 2017 at 06:49 PM 0
Share

Amazing. 3.5 years later and this is still correct. No idea how my $$anonymous$$D got switched to Release or why this is still a problem, but there it was. Thanks!

avatar image IgorAherne · Jul 17, 2018 at 07:39 PM 0
Share

Holy fk! Thanks man - works in visual studio too

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

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Set custom policy for mono developer 0 Answers

Monodevelop resets formatting preferences 1 Answer

Make MonoDevelop respect smcs.rsp 0 Answers

Can't get Mono 4.0 to go full screen on Mac OS - Mavericks? 3 Answers

Typing anything anywhere in script ceases all functions? 1 Answer


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