Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug (Case 1413904) PlayerSettings.SetScriptingDefineSymbols() does not work correctly

Discussion in '2022.1 Beta' started by Kichang-Kim, Mar 25, 2022.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    950
    Hi. I found that PlayerSettings.SetScriptingDefineSymbols() does not work when target NamedBuildTarget is different to currently selected one.

    This breaks user-created build script at first running (because Unity's default platform is usually different to your buildtarget).

    Reported as Case 1413904.
     
    oli-2019 and LeonhardP like this.
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    950
  3. oli-2019

    oli-2019

    Joined:
    Aug 2, 2019
    Posts:
    4
    any known workarounds (besides building twice?)