Version: 2021.3

PlayerSettings.SetScriptingDefineSymbolsForGroup

切换到手册
public static void SetScriptingDefineSymbolsForGroup (BuildTargetGroup targetGroup, string defines);
public static void SetScriptingDefineSymbolsForGroup (BuildTargetGroup targetGroup, string[] defines);

参数

targetGroup 设备组的名称。
defines Symbols for this group can be passed as an array or as a string separated by semicolons.

描述

BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.SetScriptingDefineSymbols instead.

为给定构建目标组设置用户指定的脚本编译符号。

第二个参数 defines 是预处理器值的字符串。此字符串包含的 值位于"Scripting Define Symbols"中,还可位于 PlayerSettings 的 Configuration 部分。

另请参阅:Platform Dependent Compilation