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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

EditorUserBuildSettings.SetPlatformSettings List of Params

Discussion in 'Editor & General Support' started by dpRob, May 1, 2018.

  1. dpRob

    dpRob

    Joined:
    Feb 16, 2018
    Posts:
    2
    I'm having a hard time finding the list of possible parameters available in Unity2017's SetPlatformSettings. Tracing this function back in the open-source repo shows an extern call - What/Where is the current list of parameters and possible values?
     
    slembcke2 likes this.
  2. AndyKorth

    AndyKorth

    Joined:
    Oct 19, 2009
    Posts:
    40
    Great question, I'd like to know the answer too. I do know of one valid and working entry:
    Code (CSharp):
    1. EditorUserBuildSettings.SetPlatformSettings("Standalone", "CopyPDBFiles", "false");
     
    gresolio likes this.
  3. TomArano_Dimenco

    TomArano_Dimenco

    Joined:
    Aug 20, 2019
    Posts:
    1
    I found that when its on "Standalone" you can basically add any setting you want


    Code (CSharp):
    1.       Debug.Log(EditorUserBuildSettings.GetPlatformSettings("Standalone", "madeUpSetting1234"));
    2.         EditorUserBuildSettings.SetPlatformSettings("Standalone", "madeUpSetting1234", "new value for this setting");
    3.         Debug.Log(EditorUserBuildSettings.GetPlatformSettings("Standalone", "madeUpSetting1234"));
    Ive seen this pop up on a few places but its been ignored so far.. hopefully an unity official can jump in this forum and help us out
     
  4. stepan-stulov

    stepan-stulov

    Joined:
    Nov 26, 2013
    Posts:
    28
    You can kind of reverse-engineer some of the hidden properties by opening the Library/EditorUserBuildSettings (Unity 2019.2) in a text editor. It's cryptic but property names are human readable. All properties that go through SetPlatformSettings are string based. Sometimes (like with Visual Studio version) neither the property name nor the value are shown in the Build UI as is, and are heavily renamed etc. Some others are as-is. Here is one unobvious example:

    Code (CSharp):
    1. EditorUserBuildSettings.SetPlatformSettings("Standalone", "m_ArchitectureFlags", "x86"); // Architecture = x86
    The whole hierarchy and naming conventions of build settings is a food fight performance. Especially the part about some of the settings being under /ProjectSettings and some other being under the unreliable /Library folder in the EditorUserBuildSettings. I think this is legacy of Unity project being thought of as one game manually built for different platforms which is not how many projects are. Later versions of Unity are better about this, like moving those "user" build settings into ProjectSettings, providing more explicit and strongly types properties, etc.

    Go figure...
     
    AndyKorth and vinay_qweebi like this.
  5. vlad_librestream

    vlad_librestream

    Joined:
    Nov 4, 2020
    Posts:
    1
    Does anyone know the plarformName value for "UWP" ?
    I've tried "Universal Windows Platform", "Windows", "UWP and none of them worked.
    I am trying to modify CopyPDBFiles there.
    upload_2021-4-20_15-21-23.png
     
  6. vinay_qweebi

    vinay_qweebi

    Joined:
    Dec 6, 2021
    Posts:
    4
    Ok, I know this hasn't received any activity in a while, but *THANK YOU* for pointing me in the right direction to solve a problem I have been banging my head against for the last week!