安卓平台指定,第二参数是宏字符串
PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, tmpSymbols);
新增宏时注意要用;分割宏,字符串是"宏1;宏2;宏3;",新增宏方法如下:
public static void AddSymbol(string symbol)
{
var scriptingDefineSymbols = new List<string>(PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android).Split(';'))
{
symbol
};
PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, string.Join(";", scriptingDefineSymbols));
}