Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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:
    1,032
    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:
    1,032
  3. oli-2019

    oli-2019

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