Multiple windows

I’m wondering what are currently the limitations for apps that would show UIs?

  1. Is it possible to mix 2D surfaces with UIs (=windows) with 3D elements.
  2. Can we have several windows for one app?
  3. Is it possible to provide multiple window drag handles, or do we always have one per app as long as it’s a bounded space?

Hello Adam, this resource should be helpful for your questions. Generally, the answers to your questions is dependent on your implementation, but generally here’s the guidance:

1 & 2: Yes, if you’re operating in the Shared Space. Within the Shared Space, you can have multiple applications living side by side, or have multiple volumes / windows for a given app (Unity support is pending). The high-level concepts here can be useful to review as well.

3: In general, you should be able to scale and re-position each window in your experience.

Hope this helps.

Edit: Added a note to indicate pending investigation on Unity’s support on multiple volumes / windows for a given app

So, currently it is possible to have have two volumes in a single unity project? One bounded and one unbounded? Is there an example or details of this setup? We have tried it few ways but always just end up with one.

Any additional information on this?

Our use-case would involve a mixture of windows, volumes and spaces. I’d also like to know if that’s possible - right now we have to choose whether we want a bounded or unbounded space.

Still looking for additional information on supporting multiple volumes… if and when it will be supported and in any information on proper set up of this.

Interested in this too!

@IsaacsUnity
Samples? Docs?

You won’t be able to have unbounded volumes running along with bounded volumes.
Specifically, you can have multiple bounded volumes running in parallel. OR, use a single unbounded volume.

One useful reference to refer to is our package samples which you can download via the package manager once the com.unity.polyspatial.visionos package has been installed.

We have a sample scene that indicates how to transition from a bounded volume to an unbounded volume. You can see this interaction in the ProjectLauncher scene, and then select Mixed Reality.

Hope that helps!

When you say “in parallel” … Does this mean that we can’t display content in multiple bounded volumes at the same time, and only one can be active? In other words, the MR app can only display one window at a time?

I ask because we haven’t found a way to display mutiple bounded volumes within a Shared Space concurrently. This functionality would be akin to the Apple TV app where you have the content menu, and selecting a piece of content brings up the video stream in a separate window.

@IsaacsUnity Also, can you please confirm whether your statement:

differs from the Exclusive space description in the docs here: PolySpatial Mixed Reality apps on visionOS | PolySpatial visionOS | 0.5.0

Since it says here that an Exclusive space is comprised of one unbounded volume and can support multiple bounded volumes, I want to make sure I understand if there is a distinction here that I’m missing. Thank you!

1 Like

The doc you linked to above says:

When running in exclusive mode, content presents a single unbounded volume, without any clipping edges. The application owns the entire mixed reality view, with no other applications visible. Additional bounded volumes from the same application can co-exist with this unbounded volume.

So, is this incorrect? Or is not implemented yet?

Also, as above, how do you have multiple windows running in parallel, switching scenes (like in the same) is still just examples of them running exclusively, not parallel (may in serial). Any combination we have tried of having multiple bounded windows in a single scene only recognizes the last one. How is this achieved?

Hey Scott, thanks for your patience, I was working with the team to get some of the information clarified. In general, there are a few ways to think about having multiple volumes running in parallel.

  • You can have multiple Unity apps running in parallel in the visionOS simulator / device. Each of these Unity apps can have a single bounded volume each, and they should co-exist in the Shared Space just fine.

  • If we are talking about working within a single Unity application today, we can only support one bounded volume OR one unbounded volume. While we have plans to have multi-volume support within a single Unity application in the future, that’s not available today.

Thank you for flagging the documentation, we’ll be working to get that updated. I’ve also revised my initial response above to capture Unity’s pending investigation on multi-volume support more accurately.

1 Like

Thanks for the clarification.

Thanks for clarifying @IsaacsUnity.

What’s the priority of implementing multi-volume support and can you give an estimated release date?

Generally, it would be nice to have more granulated roadmaps - per package perhaps. So developers can plan things ahead.

Hey, I definitely hear all the feedback. We’re working hard on a public roadmap and will share back pretty soon, thank you for your patience!

1 Like

The recent docs for 0.6.3 indicate support for multiple windows. Was that feature updated with the 0.6.3 release, or are newest docs still incorrect?

Also interested in this. Any news on multiple bounded windows?

I am also interested in this. Our use case would like to use a window and a bounded volume in the same Unity application

@IsaacsUnity
Hi, I tried PolySpatial v1.1.4, but with v1.1.4, we cannot use multi-volume or multi-window in a bounded app.
Is this correct behaviour ?

I know that this is very hard work for unity tech-staff to modify UnityAppController.mm .
(UnityAppController.mm creates UIWindow and attachs Unity view to this window )

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
    ::printf("-> applicationDidFinishLaunching()\n");

    // send notfications
#if !PLATFORM_TVOS && !PLATFORM_VISIONOS
    if ([UIDevice currentDevice].generatesDeviceOrientationNotifications == NO)
        [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
#endif

    UnityInitApplicationNoGraphics(UnityDataBundleDir());

    [self selectRenderingAPI];
    [UnityRenderingView InitializeForAPI: self.renderingAPI];

#if !PLATFORM_VISIONOS
    if (@available(iOS 13, tvOS 13, *))
        _window = [[UIWindow alloc] initWithWindowScene: [self pickStartupWindowScene: application.connectedScenes]];
    else
        _window = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].bounds];
#else
    _window = [[UIWindow alloc] init];
#endif

    _unityView = [self createUnityView];


    [DisplayManager Initialize];
    _mainDisplay = [DisplayManager Instance].mainDisplay;
    [_mainDisplay createWithWindow: _window andView: _unityView];

    [self createUI];
    [self preStartUnity];

    // if you wont use keyboard you may comment it out at save some memory
    [KeyboardDelegate Initialize];

    [self startUnity: application];
    return YES;
}

I hope I can use multiple windows/volumes in the same app soon :slight_smile: