Cannot GetEntityQuery on RenderBounds in OnStartRunning

Hi, I am new to ECS and this is my first time posting a thread in unity, I’m in your care.

I have an entity that has a RenderBounds that I want to access in OnStartRunning, but when I use

query = GetEntityQuery(typeof(RenderBounds));

It returns 0, but I have 1 entity shows in my EntityDebugger. I have also tried using EntityManager to get all the entities and access the component data of that entity but it returns an error

var entities = EntityManager.GetAllEntities();
var component = EntityManager.GetComponentData<RenderBounds>(entities[0]);

I am currently using a GameObject with a script attached ConvertToEntity.

Is there something wrong with how I’m implementing it or this is just how it is with RenderBounds?

Try OnCreate() instead of OnStartRunning

It’s the same as OnCreate, and OnCreate is called before OnStartRunning.