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

Is there a way to either up the profile zoom step or automatically fit the frame to the timeline?

Discussion in 'Profiler Previews' started by MostHated, Sep 2, 2019.

  1. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hey there,
    I was wonding there way a way to adjust the stepping of the middle mouse scroll zoom in the profile timeline view, or a way to automatically fit the current frame to the size of the timeline width? I am dealing with some Burst jobs and one frame might be single digit miliseconds, then the next might be 1.2 seconds (Yes, I know, that is what I am trying to fix, lol) so having to scroll from a 6ms frame to a 1.2sec-1.8sec frame ends up taking forever.

    Would be nice to be able to hold shift and it could make the zoom step much higher temporarily, or double click a frame in the CPU view of the timeline and it auto fit that frame to the width of the profiler, etc

    Thanks,
    -MH
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,448
    Hello,
    and thanks for the feedback. Yes that sounds like good ideas and in line with Scene View and Scene Hierarchy UX. We already had this in our backlog, I've added your use case for detail.

    For now, there are already 2 shortcuts that might help you in the meantime:
    • F (the Editor Global key for "Frame Selection") - will frame the currently selected sample or range of frame time (you can select that range by clicking and dragging in the view)
    • A - Frame the entire Frame
    We're also adding these in an update to the documentation.
     
    MostHated likes this.
  3. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Thank you much, I appreciate the information.
     
    MartinTilo likes this.
  4. KevinCastejon

    KevinCastejon

    Joined:
    Aug 10, 2021
    Posts:
    97
    @MartinTilo
    is there a way to programatically set the zoom value for Timeline and/or Animation windows via an editor script?
     
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,448
    Only via a lot of reflection.
     
  6. KevinCastejon

    KevinCastejon

    Joined:
    Aug 10, 2021
    Posts:
    97
    Thanks for replying,

    could you please give me a hint on wich object the properties/methods responsible for the zoom are located so I can try to find my reflection way down to them ?
     
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,448
    The ZoomableArea in most cases (Profiler Timeline (ProfilerTimelineGUI), Animation and Curve views) though I'm off for a long weekend so I can't browse for the fields of it. It's also several layers down so that'll be a couple of complex hoops to jump through and ones that might change version over version.
     
    KevinCastejon likes this.