Is there way to get subscene's bounds or collider?

Is there way to get subscene’s bounds or collider?
I’d like to use geometry.aabbtest. that function require parameter camera and object’s bounds.
i need subscene’s bounds

A susbscene’s bounding volume can be found in the SceneSectionData component.

thank you give me your idea.
i want more idea about function get SceneSectionData component.
can you help me more?

In the system where you want to test against a subscene you can do the following:

Entities.ForEach((Entity entity, in SceneSectionData scene) =>
{
    // test AABBs and do something with the result
}).Schedule();

If you know a specific entity associated with the given subscene you can get SceneSectionData from GetComponent<SceneSectionData>(e) or from EntityManager.GetComponent<SceneSectionData>(e).

thank you that’s right.
but, i dont know convert sceneSectionData.BoundingVolume to Bounds Type.
i’m using GeometryUtility.TestPlanesAABB(GeometryUtility.CalculateFrustumPlanes(Camera.main), bounds);

i fout that function. solved!
Unity.Mathematics.AABBExtensions.ToBounds(sceneSectionData.BoundingVolume))

1 Like