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

Bug Turning on VSync causes crash when hot-reloading code

Discussion in 'Editor & General Support' started by hughperkins, Jun 16, 2023.

  1. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    191
    To reproduce:
    - Create a new Core 3d project
    - Create a new C# script, called anything you like, e.g. foo.cs
    - Wait for that to compile
    - Go to 'game' tab, click on 'free aspect', select 'vsync'
    - command-s to 'save'
    - Quit the project
    - Start the project
    - Press 'play' to play the project
    - Double-click foo.cs, to open in Visual Studio Code
    - Add a space, or modify foo.cs in some way
    - Save foo.cs
    - Alt-tab back to the project
    => spinny, and crashes

    (On a Mac Silicon M2, running Monterey 12.6.6; Unity 2021.3.26f1)
     
  2. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    191
    By the way, this was a pita for several weeks. Then I spent ~3 hours figuring out what the root cause was. Yeah, that was not easy....