Hello! I'm new to ECS and trying to query for a Singleton entity in a system's OnUpdate(ref SystemState state). For some reason, EntityManager.CreateEntityQuery() has an error "Creating a managed array Unity.Entities.ComponentType[] is not supported" despite having the annotation [ExcludeFromBurstCompatTesting("Takes managed array")].
My OnUpdate():
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var board = SystemAPI.GetSingleton<Board>();
var manager = state.EntityManager;
// Error below
EntityQuery query = manager.CreateEntityQuery(typeof(Board));
query.TryGetSingletonEntity<Board>(out Entity boardEntity);
}
I have also tried replacing the typeof(Board) with ComponentType.ReadWrite<Board>(), same result.