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

Unity launches Unity Hub when debugging graphics using Visual Studio

Discussion in 'Unity Hub' started by jjiangweilan, Jun 15, 2020.

  1. jjiangweilan

    jjiangweilan

    Joined:
    Mar 31, 2018
    Posts:
    19
    Hi, I am not sure if this is the right place to post this :p As the title suggests, I am profiling/debugging Unity with DX11 using Visual Studio following this guide[https://docs.unity3d.com/Manual/SL-DebuggingD3D11ShadersWithVS.html]. My target path is set to "C:\Program Files\Unity\Editor\Unity.exe". once the Unity opens, it directs me to Unity Hub and when I open Unity from Unity Hub the connection with Visual Studio is lost. Is there any way I can force launch the Unity without it directing me to the Unity Hub? Or I am just setting Visual Studio to a wrong path
     
    k-_-p likes this.
  2. k-_-p

    k-_-p

    Joined:
    Sep 29, 2019
    Posts:
    1
    I ma having the same problem, set the debug target to the Unity.exe as the op does. Then following the tutorial, when I start Graphics Debugging from VS it just opens the Unity Hub, even if the Editor is already running. The "Diagnostic session" seems to run for a couple of seconds in the Hub (no frame times/fps recorded) but if I proceed to open my project it disconnects.
     
  3. BenjiM_Unity

    BenjiM_Unity

    Unity Technologies

    Joined:
    Aug 8, 2017
    Posts:
    165
    While this is not a supported flow at the moment, as a workaround you can add a command-line argument to directly open into a project:

    Open project: -projectPath <pathname>
    Create project: -createProject <pathname>
    Unity.exe -projectPath <pathname>
    https://docs.unity3d.com/Manual/CommandLineArguments.html