vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
470 stars 50 forks source link

Udon ignore compile constant #21

Closed CorneliusCornbread closed 2 years ago

CorneliusCornbread commented 2 years ago

Compile time constant (ex UDON_COMPILE) that is false only when udon compiles the script/ignores everything inside the #if compile check.

I'm trying to make use of some MyBox attributes to make sorting things in the inspector easier and being able to use them while Udon doesn't throw a fit would be nice.

MerlinVR commented 2 years ago

This is currently provided by the COMPILER_UDONSHARP constant which is only true when code is being compiled by UdonSharp.