Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Using Unity Hub 3.1.2 on WSL

Discussion in 'Unity Hub' started by juxyper, May 16, 2022.

  1. juxyper

    juxyper

    Joined:
    May 9, 2022
    Posts:
    1
    Hello,
    I'm currently working on a Unity project that is required to be run in Ubuntu 20.04 (we are going to use the Robotics Hub). My own computer is a Windows 11 machine that is quite capable of handling Ubuntu tasks in WSL2, and I already have an environment set up and ready to go.

    My main issue after installing unityhub on Ubuntu(WSL) through apt, is that the hub requires me to log in through a web browser. When such a request is made in WSL, the link is opened in my default browser in Windows, which opens the Unity Hub installed on my Windows drive.

    Using a browser that is specifically installed in WSL, for WSL manages to grab a different kind of link, but the browser fails to communicate back to the hub. Copying that link, and calling unityhub with the link as an argument doesn't help either, as the link is then rejected.

    Is there a nice way to use unityhub (v3) on WSL? Has anyone successfully opened a Unity project in a WSL environment? Would it be a good idea to use hub v2 (and how would I get it, now that it doesn't appear on the pages)?
     
    harrisonmg likes this.
  2. armadica100

    armadica100

    Joined:
    Jul 11, 2019
    Posts:
    1
    I'm having a similar issue, after going onto the Unity website, and following the Linux installation instructions i was able to get Unity installed, however upon running the Unity program a XLaunch window appears, requiring login credentials. I haven't tried using any different browsers on the OS however maybe that will provide some kind of solution for the login issue. I hope someone finds an answer as running Ubuntu in VirtualBox is a lot worse in terms of performance than just using WSL2.
     
  3. dagguh

    dagguh

    Joined:
    Oct 14, 2017
    Posts:
    1
    My workaround:
    • uninstall UnityHub from Windows
    • try to log in
    • see error about unityhub:// not having an application to open it
    • notice the URL from the error window title
    • in Ubuntu run: xdg-open "unityhub://login/?code=XYZABC123FOOBAR" with the code from the title
    I had ran xdg-mime default unityhub-handler.desktop x-scheme-handler/unityhub in the past, I don't know if that's necessary here.
     
    a_leshchenko likes this.
  4. CptQuebec

    CptQuebec

    Joined:
    Jun 17, 2021
    Posts:
    2
    kcc5837 likes this.
  5. unity_1n0vad3r

    unity_1n0vad3r

    Joined:
    Dec 8, 2022
    Posts:
    1
  6. CptQuebec

    CptQuebec

    Joined:
    Jun 17, 2021
    Posts:
    2
    I have succeded, but it is not worth it. They create an application for ubuntu, so you just have to open that application in your windows start. Performance are better on a windows version.
    I run my code in ubuntu WSL2 and the unity env in windows and it seems to work just fine.
     
  7. deguzmanricardo16

    deguzmanricardo16

    Joined:
    Feb 4, 2016
    Posts:
    1
    What do you mean by this sentece?
     
  8. unity_3uTFc18c3RjDCQ

    unity_3uTFc18c3RjDCQ

    Joined:
    Aug 23, 2018
    Posts:
    1
    I installed unityhub via the cli, followed by installing Chrome. After doing both of those things, when I hit the "login" button in Unity hub, it launched Linux' Chrome installation and allowed me to authorize.