Search Unity

EntityDebugger's ComponentSystem profiler is easy to add to

Discussion in 'Entity Component System' started by BackgroundMover, Aug 16, 2020.

  1. BackgroundMover

    BackgroundMover

    Joined:
    May 9, 2015
    Posts:
    224
    string ProfilerName => $"{this.World?.Name ?? "none"} {this.GetType().FullName}";
    Thats the key you can pass when calling
    var sampler = CustomSampler.Create(ProfilerName);

    so you can then call sampler.Begin() and sampler.End() around your code, and its profiler results will be included into the EntityDebugger system view average for the system. Needs
    using UnityEngine.Profiling;


    Its on line 160 of Unity.Entities.Editor/EntityDebugger/SystemListView.cs
     
    Razmot likes this.