Abner Santos
New member
Hey there! Been enjoying the package, thank you
However, we've been having issues with the

We've used Unity's diagnostics to pinpoint that it comes from the EntityCommandBuffer allocation in the

We saw that instead of disposing the entity command buffer in the same frame you dispose it at the start of the next frame, here:
We believe that's the issue. Is there a reason for that? Would it be possible to dispose it at the end of the frame instead? Like this:
My guess is since our server's tick rate is low and the BTs only run on the server world, that is leading to that warning being spammed every frame since it's being disposed only on the next server tick
Thank you in advance!
However, we've been having issues with the
Parallel task. We believe since it does not dispose it's TempJob allocation on the same frame, it's giving us this warning:
We've used Unity's diagnostics to pinpoint that it comes from the EntityCommandBuffer allocation in the
ParallelTaskSystem
We saw that instead of disposing the entity command buffer in the same frame you dispose it at the start of the next frame, here:
C#:
private void OnUpdate(ref SystemState state)
{
m_Dependency.Complete();
if (m_EntityCommandBuffer.IsCreated) {
m_EntityCommandBuffer.Playback(state.EntityManager);
m_EntityCommandBuffer.Dispose();
}
m_EntityCommandBuffer = new EntityCommandBuffer(Allocator.TempJob);
state.Dependency = new ParallelJob()
{
EntityCommandBuffer = m_EntityCommandBuffer.AsParallelWriter()
}.ScheduleParallel(m_Query, state.Dependency);
m_Dependency = state.Dependency;
}
We believe that's the issue. Is there a reason for that? Would it be possible to dispose it at the end of the frame instead? Like this:
C#:
private void OnUpdate(ref SystemState state)
{
m_Dependency.Complete();
EntityCommandBuffer ecb = SystemAPI.GetSingleton<EndSimulationEntityCommandBufferSystem.Singleton>()
.CreateCommandBuffer(state.WorldUnmanaged);
state.Dependency = new ParallelJob()
{
EntityCommandBuffer = ecb.AsParallelWriter()
}.ScheduleParallel(m_Query, state.Dependency);
m_Dependency = state.Dependency;
}
My guess is since our server's tick rate is low and the BTs only run on the server world, that is leading to that warning being spammed every frame since it's being disposed only on the next server tick
Thank you in advance!