Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Enable Frame Debugger shortcut?

Discussion in 'Graphics Experimental Previews' started by iamarugin, Nov 15, 2021.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Please add this feature. Sometimes you need to Debug frame when left mouse button is pressed and mouse is in the camera view.
     
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Also search field in the FB would be very helpfull.
     
  3. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    160
    Heyhey!
    Sorry for the late response. I just got notified about this post :)

    You'll be glad to hear that you'll be able to have both of those features in 2022.2. We've been working on various improvements for the Frame Debugger, which has taken a while to implement & land, that should be available in that version.
     
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Thank you!
     
  5. NRF

    NRF

    Joined:
    Apr 7, 2014
    Posts:
    1
    How about it, is there already a shortcut now? :)
     
  6. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    160
    Heyhey!
    It's been difficult to work on the Frame Debugger recently due to other priorities.
    But! I just submitted a PR (Currently in queue to land) with those features to 2023.1.
    I will make the backport to 2022.2 this week.
     
    Last edited: Sep 26, 2022
    spider853 likes this.
  7. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    This is great, thank you!
     
  8. spider853

    spider853

    Joined:
    Feb 16, 2018
    Posts:
    42
    Sad we don't have the shortcut or API in the 2021 LTS, need that on mouse click
    Thanks for the update anyway
     
  9. Tudamun

    Tudamun

    Joined:
    Sep 20, 2022
    Posts:
    11
    Code (CSharp):
    1.  
    2. private void Update()
    3. {
    4.             if( Input.GetKeyDown( KeyCode.F10 ) )
    5.             {
    6.                 System.Reflection.Assembly assembly = typeof( UnityEditor.EditorWindow ).Assembly;
    7.                 Type type = assembly.GetType( "UnityEditor.FrameDebuggerWindow" );
    8.                 var window = EditorWindow.GetWindow( type );
    9.                 window.Show();
    10.              
    11.                 var frameDebuggerWindow = Convert.ChangeType( window, type );
    12.                 type.GetMethod( "ClickEnableFrameDebugger", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public ).Invoke(frameDebuggerWindow, null);
    13.             }
    14. }
    15.  
    I've made my own shortcut that opens the FrameDebugger window and starts it through reflection.
    This is using Unity 2020.3.

    Incase it helps.