We leverage the power of the NavMesh components to create a smaller component that helps us in building a custom NavMesh around the object.
We take the size of the box around our agent, and the required difference between the box around the previous frame and the current one. If that difference is greater than the percentage we declared in sizeChange, the NavMeshBuilder takes the new position, disposes of the previous navigation mesh, and creates a new one.
That way, we can have an unknown topology, but can navigate it with the same type of agent. Furthermore, it takes considerably less time because we're using the size variable (a Vector3) to create the bounds.