Search code examples
reactjsunity-game-engineweb-applications

Using Unity 3D Engine to design a web application


I am leading a web application with a standard client-server-database architecture. My original plan was to have the client in react.js, the server in django+python, and the database in MySQL. Now, the programmer in charge of the client side is an expert in Unity 3D Engine, and he suggested to use this to implement the client. The advantges are:

  • Very easy to design;
  • Cross-platform - can be compiled to web, Android and iPhone.

One disadvantage is that the file size is larger, but for our application, it is not a substantial concern.

What worries me is that I do not know of any non-game web-applications that are written in Unity Engine, so there may be some disadvantages that I am not aware of.

Question: what are the disadvantages of using Unity 3D Engine to design the client side of a web application (versus e.g. react.js)?


Solution

  • I will mention some drawbacks I might think of compared to the web side of developing a web app. However I want to mention first that unity's versatility makes it suitable for any application you might think of and that the feature of compiling for the web is so huge. The times I am mentioning below are not big (it will depend on the app), but are to be considered if what is being built is a web app.

    Unity webgl build size is said to be large, so the init load time of your web might take some seconds. Getting your hands dirty improving that might not be feasible as the build is provided by unity, so you would also lose that flexibility improving the load times. Also if you dont have the unity's pro version, your will have the "made with unity" splash screen on your web. You can check that building an empty or very simple project to check these two things.

    If you are not using the engines features regarding the game dev side, would not make much sense to use unity for me, meaning the physics, animations, collisions etc. It is expected a larger load time for graphic things or games, not for current webs though.

    Another thing to consider. Seems that you can handle the settings of your build to work in mobile browsers, check the documentation. However the layout adaptation when you are using the app in a mobile browser might be much tougher as you renounce to manipulate easily the html and css directly yourself and renouncing to all the js and css ecosystem that might provide this work done for you. May be not renouncing, but it should take longer to integrate those in your unity builds if that is even possible.

    Also, unity webgl builds take a while to be made, so for testing and so on, the compile + building + deploy time is a bit of a drawback compared to a web "live loading" + deploy which is a much faster workflow.