美文网首页
Unity中动态加入PlayerSettings里的宏设置

Unity中动态加入PlayerSettings里的宏设置

作者: AngerCow | 来源:发表于2021-02-26 11:11 被阅读0次

    private static void SetSymbols(BuildTargetGroup targetBuild, Region region)
    {
    string sz = PlayerSettings.GetScriptingDefineSymbolsForGroup(targetBuild);
    //Debug.LogError(sz);
    string targetstr = region.ToString();
    if (!sz.Contains(targetstr + ";") && !sz.Contains(";" + targetstr))
    {
    sz = sz + ";" + targetstr;
    }
    PlayerSettings.SetScriptingDefineSymbolsForGroup(targetBuild, sz);
    //Debug.LogError("替换后:"+sz);
    }

    相关文章

      网友评论

          本文标题:Unity中动态加入PlayerSettings里的宏设置

          本文链接:https://www.haomeiwen.com/subject/xjlewctx.html