Improbable Icon

Support for new Pre-Processing Defines out of box?

v9-1-1
feature-request

#1

Is there a possibility for built-in support for a pre-processor define for fsim/client? This would be hugely valuable for development, especially now we’re moving stuff over from the gsim scala code into unity fsim code. I tried using the rsp files, but they don’t take into effect until the code is recompiled, which the build process isn’t enough to do.

Previously I kept any spiltmilk server calls etc on the scala gsim, including private keys for my REST api. But now with the move to a pure Unity workflow, there’s going to be code for fsim specific/server handling stuff that I don’t want appearing in Assembly-CSharp for the UnityClients. Taking into consideration we’re going to be putting in microtransactions which require communication to our external server (steam requires this), as well as user account information/premium currency tracking - it’s kinda important that sensitive information doesn’t fall into the wrong hands.


#2

Hey @andrew.roper, sounds like a good idea - I’ve raised it as an FR for consideration!


#3

Hey @andrew.roper,

What you could do to prevent your secrets from leaking is by passing them through flagz. These flagz work similar to environment variables and are injected at the latest stage if I see this correctly


#4

That’s a good point regarding the flagz, but there’s still other processing for transactions/account stuff that I have to do which isn’t flag related, and honestly I’d rather just eradicate the code from the client dll, as it’s really not that hard to decode and see what’s going on (resharper does a scarily good job of this)


#5

This is an interesting idea; would this suit your needs? http://answers.unity3d.com/questions/500128/set-preprocessor-symbols-from-editor-script.html


#6

For the use case that you describe I am planning on writing a C# Worker for that. Since dividing that into it’s own microservice without the Unity overhead may yield in a more optimized cluster. Though I still need to do trials on that