Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visual Studio "Attach to Unity and Play" works 50% of the time

Discussion in 'Code Editors & IDEs' started by sitnduck, Sep 29, 2021.

  1. sitnduck

    sitnduck

    Joined:
    Jun 29, 2016
    Posts:
    15
    As the title says, everything is configured properly, and I can put breakpoints and attach to Unity etc.

    The issue is that when trying to use "Attach to Unity and Play", especially after updating code and recompiling, often I can see the editor reload in the background, but then the game doesn't launch (but Visual Studio HAS started debugging, but it seems attached to "thin air"...).

    Stopping the game/stopping the debugger and starting over fixes it, but it's getting tedious to do all the time.

    Am I the only one running into this? Does anyone have any solutions to this?