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. Dismiss Notice

Question PlayerSettings.resizableWindow build error

Discussion in 'Scripting' started by unity_rLrstvXScQEvow, Mar 11, 2021.

  1. unity_rLrstvXScQEvow

    unity_rLrstvXScQEvow

    Joined:
    Mar 4, 2019
    Posts:
    28
    Hi,
    so I tried to build my project and got this Errors:

    Code (CSharp):
    1. Assets\Scripts\Menu\UIManager.cs(24,9): error CS0103: The name 'PlayerSettings' does not exist in the current contex
    2.  
    3. Error building Player because scripts had compiler errors
    4.  
    5. Build completed with a result of 'Failed' in 2 seconds (1945 ms)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
    8. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    9.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <bef6d2fbef1348939b77102b4cf6a6e6>:0
    10.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <bef6d2fbef1348939b77102b4cf6a6e6>:0
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    So it seems like that I cannot use
    PlayerSettings.resizableWindow
    inside my code when I'll build the game.
    My aim is it to make the first scene that appears resizable but the other scenes not. Is there any way to get the upper code working? Or just another way to get this done?

    I appreciate any answer.
     
  2. unity_rLrstvXScQEvow

    unity_rLrstvXScQEvow

    Joined:
    Mar 4, 2019
    Posts:
    28