How to query baked entities in Editor World?

Hi,

I want to create an editor tool that performs some calculations based on baked entities. Although the entities exist in the Editor World and are visible in the Inspector Window, querying them returns 0 entities.

var agentQuery = SystemAPI.QueryBuilder().WithAll<ComponentA>().Build();
var entities = agentQuery.ToEntityArray(Allocator.Temp); // 0 Entities

Is this expected behavior? Is there a way to query baked entities in Editor World?

Sorry, I forgot to include WithOptions(EntityQueryOptions.IncludePrefab) :joy: