Hello, while updating a project from unity 2022 to unity 6.0 and polyspatial 1.3.9 to 2.1.2, I found out 2 issues with interactions :
- with XR Grab Interactable : If we add colliders at runtime to the XR Grab Interactable gameobject, it won’t take them into notice. It was not the case before, and It’s quite a problem for me since I add different mesh and their collider to a parent object (with the XR Grab interactable component) at runtime. The script does something like this on a seperate gameobject with all the colliders :
private void Awake()
{
var boxColliderList = GetComponents<BoxCollider>();
var parent = GetComponentInParent<SpatialComponentParent>();
foreach (BoxCollider boxCollider in boxColliderList)
{
BoxCollider newBoxCollider = parent.gameObject.AddComponent<BoxCollider>();
newBoxCollider.center = boxCollider.center;
newBoxCollider.size = boxCollider.size;
boxCollider.enabled = false;
}
}
- World Space Unity Canvas animation : I have a spatial UI (World Space Unity canvas) which change scale from 0 to 1 when enabled. With the update this animation seems to block any interaction with the UI. I can’t manipulate the content buttons or scroll. When I remove this animation the UI works as expected. The part of the script on the parent canvas (world space) is something like this :
private void OnEnable()
{
transform.localScale = new Vector3(0, 0, 0);
}
private void Update()
{
transform.localScale = Vector3.Lerp(transform.localScale, new Vector3(1, 1, 1), 5 * Time.deltaTime);
}
I don’t get any errors or log, it just simply doesn’t work when these behaviors are enabled (both in the editor and in Apple Vision Pro build).
Any idea why ?
Thank you