Add Assembly Version Defines support
valenvrc
Right now creating some optional integrations between assets requires manually defining scripting symbols. This can be automated with scripts but creates multiple problems, one of them being that these symbols don't get automatically removed when the asset is no longer on the project. A solution for this would be adding support on UdonSharp for version defines, these are already recommended by vrchat as a way of detecting the VRChat SDK (https://creators.vrchat.com/sdk/detecting-vrcsdk/) so it makes sense that its supported for custom packages too.
This was also already implemented on Merlin's version of UdonSharp so it should be an easy addition: https://github.com/MerlinVR/UdonSharp/commit/0e3ab4c4858af0bd6ec071a8e9a2cefa39428ce5
Log In
techanon
This has been a LONG standing issue I've talked with people in the past. Since the UdonSharp vrchat-community repo is effectively KIA, I guess this is the best place to get this feature escalated.
Here's my 5 cents (some reiteration of the OP):
Currently, when UdonSharp compiles, it does not set the version defines declared in the respective assemblies for each compiled script, only global scripting defines.
This is a major problem for developing distributable scripts/assets that include third party package dependencies.
My major use case is that I want to develop assets/scripts that will exclude certain udon code from compilation if a specific third party package is not included (such as another community asset that I wish to OPTIONALLY integrate with).
By supporting version defines within UdonSharp compiled code, we can conditionally include code based on the packages we as package distributors wish to support but not require.