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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bug Platform-specific build functions do not work right after SwitchActiveBuildTarget

Discussion in 'Localization Tools' started by tomtanak, Nov 20, 2021.

  1. tomtanak

    tomtanak

    Joined:
    Mar 24, 2020
    Posts:
    30
    Hi,
    Platform-specific build functions, such as iOS app information, do not work properly right after EditorUserBuildSettings.SwitchActiveBuildTarget.
    I think it is because the codes in UnityEditor.Localization.Platform are switched with #if, so can you change them to dynamic branching with BuildReport.summary.platform?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
  3. tomtanak

    tomtanak

    Joined:
    Mar 24, 2020
    Posts:
    30
    Hi,
    Sorry, but the "Send a bug" menu sends some log files that include our confidential words.
    I've attached a reproduction sample here instead.

    1. Set the target platform to something other than iOS
    2. Select "Build" > "Switch to iOS and Build" from the menu bar
    3. Confirm that Build/en.lproj does not exist

    4. Quit and launch Unity Editor again
    5. Select "Build" > "Switch to iOS and Build" from the menu bar
    6. Confirm that Build/en.lproj exists properly
     

    Attached Files:

    karl_jones likes this.