Improbable Icon

Support for new Pre-Processing Defines out of box?



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.


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


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


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)


This is an interesting idea; would this suit your needs?


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