llealloo / audiolink

Audio reactive prefabs for VRChat
Other
354 stars 40 forks source link

Add AudioLink scripting define #168

Closed techanon closed 2 years ago

techanon commented 2 years ago

To allow being able to conditionally include audiolink features without compilation errors for distributed udon# assets.

My usecase: I have a single purpose plugin for ProTV that aides in integration of audiolink and protv when more than one video player is in use (such as the ProTV Modern prefab). Due to the requirement of audiolink to use this plugin, I have to have it be a separate package and remind people to not import it until they've imported the separate audiolink package as well. It would be nice to be able to wrap audiolink integrations in a scripting define to avoid having compiler errors happen when people import said package without knowing the full extent of requirements.

My use case is very niche, but I do believe that other, more useful tooling could be made with the help of a scripting define as well.

techanon commented 2 years ago

For posterity or note to self, here's how U# added their scripting define. https://github.com/vrchat-community/UdonSharp/commit/d2c9006d1bc938c18de53828874b751bd43f9ad7