BoundingBox doesn't recompute bounds when boundsOverride is modified
Describe the bug
BoundingBox reacts to transform changes of the Target object to recompute bounds. However, if a BoxCollider is used for boundsOverride to take the bounds values from, changes to the BoxCollider will not trigger a bounds update.
There is no equivalent "hasChanges" flag on BoxCollider, as there is on Transform (aside from the questionable practice of resetting the Target.transform.hasChanged flag from BoundingBox). Quick hack solution was to add a custom "HasDirtyBounds" flag that can be set externally to force a bounds update.
Problematic code: https://github.com/microsoft/MixedRealityToolkit-Unity/blob/47663d2a35becea2fd6db8b8cd4ec238507c3ad8/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs#L485
To reproduce
- Open the HandInteractionExamples scene
- Select one of the bounding box examples, e.g. "ActivateByProximityAndPointer"
- Go into play mode
- Press T to show the left hand, hold shift, move the hand over the object so the bounding box is shown
- Select the scene tab so you can see the bounds
- Change the scale of the target object, observe how the bounds adapt
- Change the size of the box collider, observe how the bounds don't adapt
Expected behavior
BoundingBox also works with a boundsOverride collider set.
Screenshots
Initial bounds:

Changing Target transform works:

Changing BoxCollider size does not work:

How about the following solution approach: expose a method in bounding box "recalculate bounds" that would recompute the bounds? Whoever is changing the bounding box would need to call that method.
How about the following solution approach: expose a method in bounding box "recalculate bounds" that would recompute the bounds? Whoever is changing the bounding box would need to call that method.
This fixed art of the problem for me. I exposed UpdateBounds() and UpdateRigHandles() and call them, after my collider is done updating itself to the desired bounds. The next problem is, that my scaleHandles (not flattend) are now all rotated the same way.
Ok, I fixed that, too: The BoxCollider (BoundsOverride) must be on the TargetObject to be displayed correctly.
Simply disabeling the BoundingBox component, when changing the collider bounds, seems to work for me. So if anyone is looking for a quick workaround, just use ...
boundingBox.enabled = true/false
... while you're recalculating the collider.
merged.