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. Dismiss Notice

Question Deep Profile not showing script calls

Discussion in 'Editor & General Support' started by doddsey65_unity, Jul 26, 2023.

  1. doddsey65_unity

    doddsey65_unity

    Joined:
    Jan 28, 2018
    Posts:
    5
    I've enabled deep profile on the profiler, but it never shows my script calls. Here you can see I've searched for a function which gets called, but there are no results. I've also looked at all of the calls in the Player Loop and can't see anything there relating to my code.

    upload_2023-7-26_14-17-24.png

    Is there some setting I'm missing here? It used to work a couple of days ago but not any more.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Are you 100% sure that function did get called in that particular frame, eg by logging Time.frameCount inside the method and confirming this in the Console (or just a breakpoint)?

    Not sure if the filter is requiring you to enter the exact method name or whether it allows partial matches, so check that too.
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,769
    I think you need to hit that 'Call Stacks' button up top for the them to display.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,140
    Partial matches work

    No, that option is for reporting callstacks on certain special samples, like GC.Alloc

    That sounds odd. Could the function be executed on a thread (e.g. as part of an async task or job)? This view only shows the main thread.

    You could also insert a Tread.Sleep(200) call into your method to make it more (visually) obvious and also check Timeline view for a view across all threads. And you could add an explicit ProfilerMarker to your method to mark it up even when not Deep Profiling. If that marker shows up while deep profiling and your method does not, that would sound like a bug to me.
     
    spiney199 likes this.