-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example for setting preprocessor macros #473
Comments
Accepting PRs. We will not suggest using a dirty build if you can simply ignore that file. The dirty check is there to ensure no files were accidentially changed during or after checkout and would effectively be disabled by this measure. The docs should therefor not suggest using |
cc @xwipeoutx |
I still need to run yarn / test my changes locally, but I put up an initial PR and would appreciate any feedback, to make sure this is on the right track #474 |
Merged #474 so closing this issue |
Context
Sometimes you want to include a preprocessor macro in your build (eg: #ANDROID, #DEMO, etc... ) in order to change what gets compiled into the build. Unity supports this behavior in the editor.
Suggested solution
Add the following example outlined here as an example in the 'Builder' section of the official wiki: game-ci/unity-builder#207
(Credit to @xwipeoutx for posting the following solution)
You will get warnings about "unapplied changes" - you could get around this by putting
csc.rsp
in your.gitignore
, or allowing dirty build.Now in your code you can just do this:
See Unity docs for the inspiration - under the heading "Setting scripting symbols via an asset file"
Originally posted by @xwipeoutx in game-ci/unity-builder#207 (comment)
The text was updated successfully, but these errors were encountered: