Search Unity

[UPDATED] Is it a good decision to create a site with unity?

Discussion in 'General Discussion' started by mrtkhosravi, Jan 17, 2016.

  1. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    We are considering unity WebGL to be the client for a 3D site. Think of it as a shopping site with transaction and cart. The customer can walk into the supermarket and buy everything. It has to support financial transactions including bank accounts.

    Is it possible in unity? Is it advisible to use unity as the client?

    EDIT: I tested a scene with one plane, a camera and a directional light. After taking advices to reduce build size, the output became 5.7MB. Is this the absolute minimum we can get? No way to reduce that further with the cost of CPU maybe?

    Do you suggest any strategy to make the initial loading less nerve racking? Let's say we show a login dialog and place it on index.html to make user fill the form. This will give us a little time. Then what? Is it possible to load unity's .js files with multiple connections say 8 simultaneous connections to boost initial load time?
     
    Last edited: Jan 17, 2016
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    This is a terrible idea. WebGL isn't mature enough for this in general and Unity's WebGL implementation still leaves much to be desired. Just make a normal website.
     
    Ostwind, Kiwasi and mrtkhosravi like this.
  3. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    I'd say use Unity for the 3D part with the underlying cart implemented using more standard JS mechanisms.

    EDIT:

    My answer is under the assumption that the unique value proposition is the 3D storefront.
     
    mrtkhosravi likes this.
  4. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    I agree completely about the webgl and webplayer. But it is supposed to be a different "thingy" not like just any other site. I think it takes a few month to implement it. Maybe (just maybe) that could relax the WebGL's immature status. Do you think it is a good bet?

    You mean a normal unity project that interacts with some facade and that facade interacts with the server?
     
  5. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Yes. Its simple to move data between the two ( http://docs.unity3d.com/Manual/UnityWebPlayerandbrowsercommunication.html ) and ideally you could keep any sensitive information away from Unity (personally I'd be a lot more comfortable with transaction data moving through well understood channels).

    Also means you can fall back gracefully to a standard site which might be a nice to have. Don't want to turn business away because someone is on an older browser or the like.
     
    mrtkhosravi likes this.
  6. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    Excellent point. Excellent
     
  7. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    Updated the question. So bump...
     
  8. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    T R B L
     
    mrtkhosravi likes this.
  9. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    No, the idea of a website is to make it as accessible as possible, webgl and unity plugins do not allow this.
     
    mrtkhosravi likes this.
  10. I_Am_DreReid

    I_Am_DreReid

    Joined:
    Dec 13, 2015
    Posts:
    361
    A website??? Bruh you don't want to.
     
    mrtkhosravi likes this.
  11. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    Using Unity for a website? Never.

    Actually, WebGL (not Unity's one) CAN be used for pretty stuff. Even for an interactive website.
     
    mrtkhosravi likes this.
  12. djkeel

    djkeel

    Joined:
    Jan 20, 2016
    Posts:
    12
    horrible idea
     
    mrtkhosravi likes this.
  13. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,971
    plot twist:
    Try it and find out! :3

    5MB of minimum size doesn't sound like a lot. That's like one second of a youtube video.
    Unity homepage has a 1080p video as background.
     
    Last edited: Jan 20, 2016
    mrtkhosravi and GarBenjamin like this.
  14. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    These days you may be able to get away with it. Seems like it'd be little in difference from all of the Flash websites that were a rage before the news of depracation.

    Maybe make some kind of template system where you have content areas and the data is pulled from text files and displayed.

    But really if you're using Unity might as well go all out. Make navigation work by literally exploring the site moving character forward in a screen down a hall or whatever. Doors with signs above them are the links.

    Who knows you may start "the next big thing".
     
    mrtkhosravi and dogzerx2 like this.
  15. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Generally speaking, I would advise against this.

    You could make a flash-esque site with this approach. But flash sites went out of vogue quite a while ago. These days data-driven design is farm more common, and far more accessible to the average web developer. Unity would be fine for some snazzy animations and graphics, but it wouldn't exactly be optimal for a more complex, data-driven interface. Possible, but not the most elegant solution, and probably more trouble than it's worth.

    A data-driven CMS with embedded Unity examples would probably be a better approach for a more long-term regularly updated website.
     
    mrtkhosravi and GarBenjamin like this.
  16. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,572
    Quick test with empty scene in 5.1.3 webplayer preview resulted in 36 megabytes. That's not good.

    It is one thing to put a streaming video in background, and another is to make site that relies on heavy download in order to work.
     
    mrtkhosravi and GarBenjamin like this.
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    You just described the failure known as VRML. :p
     
    mrtkhosravi, Martin_H and GarBenjamin like this.
  18. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    36 MB for an empty scene?!! That's insane. The WebPlayer target always produced builds that were a fraction of the desktop build size. This new WebGL target appears to have scaled up size by many factors.
     
    mrtkhosravi likes this.
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    Just tried creating a new project, saving the empty scene, adding it to the build project, and hitting build. 3MB on 5.3.1f1.
     
    mrtkhosravi and GarBenjamin like this.
  20. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    That's not the case. If you uncheck development build you will have a 5MB output (assuming a camera and some mesh is present in the scene).
     
  21. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Have you done any market research, what browsers, hardware and internet speeds will the customer of the site be using (based on product demographics e.g. high end/high tech gadgets)?

    Unity WebGL will probably work better for customers with PC/Mac software on mid to high end hardware with fast internet connections.

    I'm not sure there is secure way in Unity to process credit card data, you might have to use a 2 stage site with the shopping in Unity and the purchasing via a secure website or overlay stage.
     
    Ryiah and mrtkhosravi like this.