title: Unity setting Player Settings Target Architectures via Script
body: <p>I have my custom build script and I want to add more options in it.
  One of them is Target Architectures. (I'm using IL2CPP as a scripting backend - I set it by script)</p>
  
  <p>Here you can see which settings I want to change:
  <a href="https://i.stack.imgur.com/YQqge.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YQqge.png" alt=""></a></p>
  
  <p>According to <a href="https://docs.unity3d.com/ScriptReference/PlayerSettings.SetArchitecture.html" rel="noreferrer">docs</a> I can use PlayerSettings.SetArchitecture(), but it seems not to work for me at all. It only has an option for 0 - None, 1 - ARM64, 2 - Universal and I want All. So I tried using:</p>
  
  <pre><code>PlayerSettings.SetArchitecture(BuildTargetGroup.Android, unchecked((int)AndroidArchitecture.All));
  </code></pre>
  
  <p>but it doesn't change anything, also the lines below does not change anything:</p>
  
  <pre><code>PlayerSettings.SetArchitecture(BuildTargetGroup.Android, unchecked((int)AndroidArchitecture.ARM64));
  PlayerSettings.SetArchitecture(BuildTargetGroup.Android, unchecked((int)AndroidArchitecture.ARMv7));
  PlayerSettings.SetArchitecture(BuildTargetGroup.Android, unchecked((int)AndroidArchitecture.X86));
  </code></pre>
  
  <p>I'm wondering how I can do it correctly?</p>