Search Unity

Question Missing Profiler.EndSample()

Discussion in 'Entity Component System' started by Hecocos, Nov 22, 2023.

  1. Hecocos


    Nov 29, 2021
    I used DOTS SystemGroup to tick my CustomWorld with Update logic, it will cause "
    Missing Profiler.EndSample (Every BeginSample call must have a subsequent EndSample call within the same frame)". But if i tick my CustomWorld with the callback (Update()) of an GameObject's Monobehaviour, it will be ok. Because of lots of Profiler.BeginSample/EndSample in my project, maybe it has some mismatching causes. But why it's ok in GameObject's callback.