Open efarraro opened 1 month ago
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 allowDirtyBuild
for this purpose.
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 https://github.com/game-ci/documentation/pull/474
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: https://github.com/game-ci/unity-builder/issues/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 https://github.com/game-ci/unity-builder/issues/207#issuecomment-2269981553