Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Why are compiler defines never respected FROM *.rsp files WHEN namespaces are used?

$
0
0
**Issue** I have much success with RSP files for "-unsafe". It works in all unity versions and all platforms my team requires. However, I recently added custom defines to the RSP files. Everything works great UNLESS namespaces are used. We use namespaces on all our code. So unfortunately this is a blocker to our use of RSP files for defines. Our ideal workflow relies on RSP files. **How To Reproduce** * create an RSP file (or one per compiler as your needs demand). I use csc.rsp, gmcs.rsp, mcs.rsp, smcs.rsp. All with identical contents. * Add "-define:MY_CUSTOM_DEFINE" to any/all RSP files * Create a new monobehavior. Attach it to a game object. press play. It works. * Wrap the monobehavior file contents in #if MY_CUSTOM_DEFINE and #endif. It works. * Now wrap the class in a namespace. Now it fails. Unity acts like the code is NEVER available, regardless of the RSP contents. **Bug?** * I created a test project and reported it to Unity. No response yet. **Ideas?** * Ideas on workarounds to declare a CUSTOM define in an RSP file and use namespaces too?

Viewing all articles
Browse latest Browse all 398

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>