ドキュメント

Unity Engine

Unity Engine

Conditional compilation

Use and define preprocessor directives to selectively include or exclude sections of your code for compilation.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

This section covers the use of preprocessor directives and scripting symbols to conditionally compile sections of your C# code.

Topic

Description

Conditional compilation in UnityAn overview of how and when to use conditional compilation in your Unity scripts.
Unity scripting symbol referenceA reference of the predefined scripting symbols Unity provides.
Custom scripting symbolsCreate your own custom scripting symbols via the Editor UI, from scripts, or with an asset file.
Test conditional compilationCode example and steps to test your conditionally compiled code.

Additional resources