Managing Volume States in Unity with Polyspatial: Opening and Closing Issues

Hi there! I had no issues developing a multi-volume bounded window using Unity 6 and Polyspatial 2.1.2. However, when I call CloseWindows() to close a volume, it doesn’t successfully close. So, I tried setting the volume’s active state to false, but when I set it back to true, the click interactions for the volume encounter problems, allowing me to interact with objects that are already hidden. I would like to know how to properly open and close the same volume without destroying it. Is that possible?

Hi!

Sorry you’ve been running into issues! I believe CloseWindows()/OpenWindows() might be deprecated, I will have to check in with the team on that (and if it isn’t deprecated, I’ll go ahead and make a ticket to look further into it), but toggling the volume’s enabled state should do the trick for closing and opening volumes.

Just to get more information on the issue described - is this on PlayToDevice or a built/deployed project? By hidden objects, do you mean objects that are disabled are now becoming visible after the volume comes back? Or did you mean they are allowing interaction somehow, despite being disabled? If you can visualize the colliders in Xcode and see if the colliders pop up after you disable and re-enable the volume (see pic on what that setting in Xcode looks like), that’d also add more info on what’s happening.

The ideal thing would be to file a bug and send a repro project if at all possible, but hopefully just visualizing the collider sheds some light on what’s going on!

1 Like

Hi there. I am working on a project with multiple Bounded Volumes, and I am currently testing in Build To Simulator. I have enabled visionOS Debugging - Visualizations - Collision Shapes and Axes in Xcode. When I use enable to activate and deactivate the volume instead of using OpenWindow()/CloseWindow() , I noticed that after activating Bounded Volume A and then closing it, when I open Bounded Volume B and then close Bounded Volume B to open Bounded Volume A again, the collision bodies that were originally hidden in Bounded Volume A are now visible in the scene. This means that objects with Active set to false can still be interacted with, which I believe is a serious issue. I will provide a reproduction project for you shortly.

Hello, vcheung-unity. In my attempts, I was unable to create a minimal reproducible program to replicate the situation I mentioned. In the minimal reproducible program, everything works fine. I suspect that there might be something in my project that is causing the error in Xcode.

1 Like