Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug BuildPipeline.BuildPlayer Changes Editor's Build Settings

Discussion in 'Editor & General Support' started by aydin_khp, Jan 29, 2021.

  1. aydin_khp


    May 15, 2020

    I use BuildPipeline.BuildPlayer which is called from a custom MenuItem to build the headless version of my multiplayer game for different targets (Linux and Windows) so that I don't have to:
    1. Go to the Build Settings window
    2. Change the target
    3. Enable Server Build
    4. Build
    5. Disable Server Build
    6. Change back the target
    7. List item

    Note: I have to change back all the setting because my server's target (Linux) is different from my client's target (Windows).

    The problem here is that the BuildPipeline.BuildPlayer changes the target setting on the Editor's Build Settings; As far I know this is the only field it changes and they remain the same. I think this is a bug, is that right? And if it is, how can I file a bug for unity?

    Look forward to hearing from you.