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

Editor Play button wipes out per-platform settings, causes super slow player movement

Discussion in 'Editor & General Support' started by RealHandy, Feb 19, 2022.

  1. RealHandy

    RealHandy

    Joined:
    Jul 11, 2020
    Posts:
    21
    I've had a problem crop up in which Build and Run (but not Editor Play mode) of my app causes my player avatar to move _very_ slowly and generally break the player behaviors.

    I've tracked it all the way down to this and can repro it at will.

    1. Open the working project that isn't exhibiting the bug. DO NOT hit the play button and run the project in the editor at this time.
    2. Build and Run the project. The slow bug does not occur in the built, running app. Close the app.
    3. Use the Play button to run the project in the editor. You don't see the slow bug here, either.
    4. That running of the Play button updates QualitySettings.asset with a change that introduces the bug, BUT you don't see the slow bug yet -- Build and Run still works at this point. This is the update that the Play button causes in QualitySettings.asset, and this change introduces the bug, but only after restarting the Unity Editor.

    • 5. Close the project and reopen it
    • 6. Build and Run the project. THE SLOW BUG OCCURS.
    If I add these values -- in fact, if I add only the Standalone value -- manually back into QualitySettings.asset, the slow bug disappears again. But I can't get the Quality Settings UI in the editor to make this change, and every use of the Play button to run in the editor re-wipes m_PerPlatformDefaultQuality, reintroducing the bug.

    I'm on 2020.3.26f1, having updated from 20f1. I obv don't want to have to keep manually editing QualitySettings.asset after every use of the Play button. Does anybody know what's up with this? Is there a way to fix it, or am I looking at an Editor bug?

    Thanks!
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,053
    sadly I've understood nothing. could you explain better?
     
  3. RealHandy

    RealHandy

    Joined:
    Jul 11, 2020
    Posts:
    21
    I can try.
    1. My game works fine when doing Build and Run -- my player avatar moves around as it should, nothing is broken.
    2. Use the Play button to run the game in the Unity editor. Doing this causes Unity editor to wipe out (as shown in the screenshot of QualitySettings.asset above) all of the per-platform quality settings that are normally set using the Edit/Project Settings.../Quality option in the editor (which looks like this if you have only Standalone platform configured):
    quality settings.png

    3. Because m_PerPlatformDefaultQuality no longer exists in QualitySettings.asset, my game is now broken -- my player avatar moves very slowly, falls through mesh boundaries that it should stop at, etc.
    4. You can fix it by going back into Edit/Project Settings.../Quality and re-choosing the Default option dropdown shown above the "Add Quality Level" button in the screenshot. This adds the platform setting back into the m_PerPlatformDefaultQuality list in QualitySettings.asset.
    5. EVERY use of the Play button in the editor wipes out the quality default settings.

    This bug just began happening for me when I did the last update to my Unity version -- from 20f1 to 26f1. Going to 29f1 did not fix it.
     

    Attached Files:

  4. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,053
    ok, that is clear. I have no solution. but maybe you can try to submit a bug report with the explanation above. thye may have broken something in the editor, who knows