See Methods Called Through UnityEvents in Performance Tab

Hi! So I have this script that has UnityEvent called on FixedUpdate. The idea is that I attach various methods to this OnFixedUpdate through the Editor like this:

5113100--504740--2.PNG

This is the Brain script where this OnFixedUpdate resides:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using Sirenix.OdinInspector;

public class Brain : MonoBehaviour
{
    [SerializeField, FoldoutGroup("Fixed Update")]
    private UnityEvent OnFixedUpdate = null;

    void FixedUpdate()
    {
        OnFixedUpdate.Invoke();
    }
}

But the problem is that in the Performance tab I only see the Brain.OnFixedUpdate method called. I can’t see what specific methods were called through this OnFixedUpdate:

5113100--504743--1.PNG

Is there a simple way to see the methods that are being called through OnFixedUpdate?

Hello,
Sounds like you’re looking for the Deep Profiling Option. In 2019.3, when Profiling a Player, you’ll have to build it as development build with Deep Profiling Support enabled in the build dialog. Previous versions only have Deep Profiling capability for Profiling in the Editor.
Alternatively you could add ProfilerMarker calls to the methods you registered to the event, or instead of using a C# event, use a List where you add the events to and add ProfilerMarker calls before and after every call you make on the Actions in that list as you iterate through it.