Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

WebGL improvements since Unity 5.2?

Discussion in 'Web' started by muzzydev, May 18, 2017.

  1. muzzydev

    muzzydev

    Joined:
    Oct 31, 2014
    Posts:
    7
    We have some projects that are in production on Unity 5.2. Have performance and/or memory usage in WebGL improved between 5.2 and 5.6? Is it worth upgrading?
     
    yopunky likes this.
  2. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    The improvements for us were massive (crunched textures, better stripping, web assembly if you're adventurous, etc.).

    We should all buy Rich Geldreich a drink for developing and implementing crunched textures.
     
    yopunky and sirrus like this.
  3. muzzydev

    muzzydev

    Joined:
    Oct 31, 2014
    Posts:
    7
    Thanks for the feedback! Out of curiosity did you have any issues with memory leaks when you were using 5.2?
     
  4. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    If you mean memory leaks that you referenced in the other thread, no. But I think every unity webgl developer has faced at least some memory challenges.

    My general webgl memory advice is first try to be as update to date with Unity as possible (things are always improving), but more importantly make sure you make good use of asset bundles. You want to defer loading of assets until after the binary has been loaded/parsed. In addition, try to break up your asset bundles into chunks (try to avoid putting big asset bundles on the heap). And as mentioned before, definitely utilize crunched textures, they are an easy big win.
     
  5. GregPDesUGD

    GregPDesUGD

    Joined:
    Jul 27, 2016
    Posts:
    93
    Hi there! I want to build a game out of random with Unity 5.5 and build it to WebGL. Reflecting on what happened when I built my first public game last fall called GPD Pong, the #1 complaint I got from different players was the performance of the game, as it only runs between 10 to 15 frames per second when built.

    I am a newcomer to the framework, so I still need to learn on how to use the Profiler and different tools to improve performance on the game. I understand that one way to do this is to downgrade the graphics quality by having less triangles and simpler collision models, but that's not the only reason why it can take so long to render one frame of gameplay. It could be physics and so on.

    What do I need to do once I have the majority of the gameplay components put in place?