Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Smaika · May 18, 2016 at 11:41 AM · webgloptimizationlag

WebGl Using too much memory

So I create a 3D endless game and build it for Webgl and you can check it here (run the game and take a look at the memory usage from the task manager) https://dl.dropboxusercontent.com/u/103586730/RollBall!/index.html

The problem is its using 450+MB of memory it even reaches 500 and more that's 0.5GB what is wrong is it my code note that if you checked the game out I did try to stop the generation of the floors and still it only dropped less than 50MB, So I tried to disable every thing in the scene (Except the camera) and still it uses about 300MB then I tried to only enable the generation of the floors and now it uses 390MB so it could possibly be the generation of the floors is what causing it to use that much so I'll figure out another way to generate the floor but an empty scene using 300MB that is a big problem.

I have read an article here http://forum.unity3d.com/threads/webgl-roadmap.334408/ and it said that JavaScript require a lot of memory and since I use JavaScript for this game could it be the reason and if I spend my next 2 weeks to translate it to C# all of this issue can be from the past? What do you think can be the reason? And how to fix it?

Basically how to properly optimize an WebGl game?

Using Unity 5.3.4p6

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by nsmith1024 · Dec 17, 2016 at 01:17 AM

No, moving to c# will not help, i have c# code and I have a blank scene with just a terrain and 4 prefabs, each with 5 textures, and its using over 700MB, then gives memory error if i add anything. How can you make a game from just that?

I think WeBGL is a useless technology, unless you are making the simplest game like tic tac toe, or a board game, or you have a massive Graphics team to ultra optimize every pixel, your screwed, like me.

Only god knows why they didnt let us keep using WebPlayer until they get something better, but WebGL sucks, its the worst thing created by the software industry. Maybe when Web Assembly comes out it will be better, but right now WebGL seems useless to me. I spent 6 month writing a WebGL app only to find out it cant work because WebGL hogs too much memory, unless you can allocate 2GB of browser memory. Dont know who thought javascript, a simple language made for simple websites, could be good for games.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

48 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why does this simple follow script make my game lag? 2 Answers

Public, private and getting stuff efficiency question. 2 Answers

Alternative to SendMessage()? / Mobile Optimization 1 Answer

How can I optimize my range tests? 1 Answer

Unity WebGL 60FPS on Windows, 30FPS on MacOS 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges