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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. 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:
    861
    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:
    861
    Also search field in the FB would be very helpfull.
     
  3. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    158
    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:
    861
    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:
    158
    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:
    861
    This is great, thank you!
     
  8. spider853

    spider853

    Joined:
    Feb 16, 2018
    Posts:
    36
    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.