Search Unity

Bug Please don't use Electron Framework for Unity Hub

Discussion in 'Unity Hub' started by BuildSucceeded, Apr 16, 2022.

  1. BuildSucceeded

    BuildSucceeded

    Joined:
    Jan 31, 2016
    Posts:
    3
    Please don't use Electron Framework for such a simple app like Unity Hub.

    - it's slow(launching on my MacBook Pro M1 Pro Max took at LEAST 5 seconds.
    - its glitchy
    - just develop new app using SwiftUI.
     
  2. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    78
    this is not bug nor a valid request nor they have to conform to your ideals - this is your option man
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Have you tried any other Electron-based apps to see if they have a similar problem?
     
    DragonCoder likes this.
  4. smolten

    smolten

    Joined:
    Jul 7, 2018
    Posts:
    7
    I do not need or expect Unity Hub to offer the Feature Suite of a "Generalized Web Browser"
    I DO expect Unity Hub to Browse/ Download all -Unity Versions-, as well as have a "missing
    But it does neither of those "download/install File XYZ" features one would expect from a WEb Browser
    So, since Electron+Unity cannot browse Unity Versions, I must navigate to Electron+Google - Then search for "Unity Archive", be re-directed to "https://unity3d.com/get-unity/download/archive", we all know the drill.....

    So, I must ask:
    Why does Unity Hub use the Web-Browsing Swiss-Army knife Electron,
    When Unity Hub is not even configured to browse https://unity3d.com/get-unity/download/archive?

    Edit: I stay well away from Java/etc, so my characterization of Electron as "Web-Browsing Swiss-Army knife" is probably not accurate - I hope my point still stands...
     
    Last edited: Apr 19, 2022
  5. Because it is an application built for three platforms (windows, mac and linux), Electron is a multiplatform framework. They are using it for the very thing Electron was created for.
    It is a UX decision, they could implement the listing of archive version, they decided not to for the simplicity for the users.
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    This. If Unity were to switch to another framework it would be to another multiplatform one like Qt. It would not be to a platform dependent one like SwiftUI since maintaining UIs for all three platforms in that way would triple the cost of developing and maintaining the hub.

    Electron is Chromium plus node.js. With that in mind you might make the assumption that everything runs through JavaScript including the core framework itself but that's not the case. Just like Unity's core is C++ with C# being a scripting language, Electron's core is C++ with JavaScript being a scripting language.

    Since Electron is designed to run a single application I would refer to it as a "Multiplatform App Swiss-Army knife".

    There are lighter alternatives available like Tauri and Neutralinojs but the primary reason Electron sees as much use as it does is like Unity. It was one of the earliest if not the earliest attempts at creating apps using web tech and it's had time to mature.
     
    Last edited: Apr 20, 2022
  7. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,696
    Wonder why they don't just use Unity itself for the launcher. That's platform independent too after all.
     
  8. smolten

    smolten

    Joined:
    Jul 7, 2018
    Posts:
    7
    Was just about to ask this
    "You know what ELSE builds Cross-Platform apps? :p"


    Well, because the Unity Website has a handful of Lists
    And I'm able to navigate that one just fine
     
  9. Unity is a game engine, not an application framework. That's why.
     
  10. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Electron is a garbage fire of insane proportions.

    Remember the other day when a Hub update just ran arbitrary code on user's computers from a third party because a Hub build had just imported the latest version of a package when it was built? Remember when they were barely able to ship any features or bug fixes in like 5 years of development? That's what happens when your code is on Node.js, kids!

    I mean these days it's a movie making framework and a CAD tool and whatever else you'd want. If it's not able to make three tabs with very simple buttons that need to just launch other programs, which is what the Hub is, it's not able to make games either.

    Electron is a solution to the problem "our organization consists only of web devs that only know the Javascript ecosystem, but we need to make a desktop application!". Why the hell Unity, which is an organization full of c++ desktop application developers, decided to go with Electron is beyond me. It was for sure the wrong decision.
     
  11. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,696
    Lol.. Visual Studio Code is based on it and MS Teams was for a couple years. Two softwares running on many million computers.
    I do assume that they verify packages somehow before they update to them.

    Guess a possible issue with using Unity as a launcher, might be start time. People already complain about the start time of the electron app.
    Which makes it a bit unfortunate that Project Tiny has been discontinued/paused. That one might have been ideal for this and also other things that fit the category of tools more than games.
     
    Last edited: Apr 21, 2022