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
0
Question by Martin_Gonzalez · Nov 10, 2014 at 05:05 PM · c#preprocessor

Unity and Custom Defines

Hi everybody, i'm trying to create a #define in c# to let the compile see or not a sdk code. I'm trying to do what this says http://docs.unity3d.com/Manual/PlatformDependentCompilation.html but i cant, Unity throws this error:

Internal compiler error. See the console log for more information. output was:warning CS2029: Invalid conditional define symbol LITE\' error CS2001: Source file {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210' could not be found

error CS2001: Source file {\fonttbl\f0\fmodern\fcharset0' could not be found error CS2001: Source file Courier;}' could not be found error CS2001: Source file {\colortbl;\red255\green255\blue255;\red44\green50\blue53;\red245\green249\blue250;}' could not be found error CS2001: Source file \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0' could not be found error CS2001: Source file \deftab720' could not be found error CS2001: Source file \pard\pardeftab720\sl640' could not be found error CS2001: Source file \f0\fs22' could not be found error CS2001: Source file \cf2' could not be found error CS2001: Source file \cb3' could not be found error CS2001: Source file }' could not be found Anybody know how to? Thanks!
Comment
Add comment · Show 3
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 SarperS · Nov 10, 2014 at 06:33 PM 0
Share

Please share the code snippet where you use the define preprocessor directive

avatar image SarperS · Nov 10, 2014 at 06:38 PM 1
Share

Please share how you made it work and what the problem was before as an "answer" and then select it as the correct answer to close this topic.

avatar image Martin_Gonzalez · Nov 10, 2014 at 07:56 PM 0
Share

I wanted to create a custom preprocessor define, so i went to player settings -> Others and in Scripting define symbols i created a define called FINGERPRINT. then in my code i used #if FINGERPRINT and depend wich platform had this define the compiler will se or not the code inside

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Martin_Gonzalez · Nov 10, 2014 at 06:36 PM

I understood now how to use them. I did preprocessors in a specific platform and now works!

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

adiing a wait betweem if statements 1 Answer

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

Unity: recursion or not recursion? 2 Answers

Ref modifier 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