Conditional compilation
Use and define preprocessor directives to selectively include or exclude sections of your code for compilation.
阅读时间1 分钟最后更新于 20 天前
This section covers the use of preprocessor directives and scripting symbols to conditionally compile sections of your C# code.
Topic | Description |
|---|---|
| Conditional compilation in Unity | An overview of how and when to use conditional compilation in your Unity scripts. |
| Unity scripting symbol reference | A reference of the predefined scripting symbols Unity provides. |
| Custom scripting symbols | Create your own custom scripting symbols via the Editor UI, from scripts, or with an asset file. |
| Test conditional compilation | Code example and steps to test your conditionally compiled code. |