Search Unity

Question Can't launch multiple browser instances within Hololens 2 Unity app

Discussion in 'AR' started by erodriguez501, Nov 12, 2021.

  1. erodriguez501

    erodriguez501

    Joined:
    Apr 8, 2021
    Posts:
    2
    Hi everyone,

    I've been trying to open Windows Edge when pressing a button from within my Unity app on Hololens 2, so far I managed to open 1 instance of the browser, but when I press the button again, instead of opening another browser window, it closes the previous one and opens a new one. I've also tried to open a new tab and then drag it so it opens a new window, but same results, it closes the previous one and opens a new one.

    I've already tried:
    Code (CSharp):
    1.  Application.OpenURL(url);
    and
    Code (CSharp):
    1. var uri = new Uri(url);
    2. await Launcher.LaunchUriAsync(uri);
    The 1st one makes my app crash after opening the browser and the 2nd one only lets me open 1 browser window maximum.

    I've also tried opening the browser directly from the HL2 Start Menu, same results within my app. This has me confused as the problem probably isn't my previously posted code.

    Thing is this doesn't happen outside my Unity app, you can open multiple browser windows without problems.

    I'm using Unity 2020.3.15f2, MRTK 2.7.2, openxr 1.1.0 and my HL2 are up to date

    I'd appreciate any information/help regarding this, since I'm clearly missing something.
     
    Last edited: Nov 12, 2021
  2. snjimejak

    snjimejak

    Joined:
    Mar 14, 2022
    Posts:
    1
    I have had the same problem only I want open more than one UWP instance in the Unity explorer app and I've not found a solution. Can someone help me ??