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
1
Question by xarismax · May 01, 2017 at 06:55 AM · loadingmemory management

4 gigabyte "loading screen"

i have noticed that all unity games released (example: endless space 2) consume 2 - 4 gigabytes for a simple main menu with 4 buttons.

in pure c, this menu would have taken 100 bytes at max.

So unity consumes 4294967296% more file size for a simple main menu than c.

Is this a bug with the unity engine ? Does it have to "preload" all potential models / textures / sprites of the game that will ever be used in the future, even for scenes that haven't ever been loaded, and wont ever be loaded because player with just click "quit" instead.

If so how could one avoid this issue and load the resources only when needed in a scene.

At this rate, the next game will consume 100 gigabyte for a "now loading button". Unfortunately, rams cannot hold more than 4 gigabytes.

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

4 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Nition · May 01, 2017 at 08:40 AM

Unity generally only loads assets as needed, unless they're in a folder called Resources.

I wonder if the games you're looking at are doing things a bit wrong and throwing everything into the Resources folder, or if they're intentially preloading everything for performance.

As an example my own Unity game uses around 150MB of RAM at the main menu and around 300-400MB while in-game with everything loaded.

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
avatar image
2

Answer by WarmedxMints · May 01, 2017 at 09:00 AM

All Unity games? That's simply not true.

Superhot & poly bridge certainly don't for example. It all depends on what the game is doing.

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
avatar image
1

Answer by Eric5h5 · May 01, 2017 at 08:45 AM

This isn't what happens, though; seems like you have a problem with your system. Building a project with an empty scene takes around 100MB of real memory (macOS 64-bit build). This is because it's loading the entire engine. However scenes don't use any RAM if they haven't been loaded. I don't have Endless Space 2, but I do have Endless Space 1, and when the main menu is loaded it's using around 180MB. (It would take far, far more than 100 bytes in C, since there are various sounds/textures/etc. that are used.) If by "rams cannot hold more than 4 gigabytes" you're trying to say that apps can't use more than 4GB, that's incorrect. RAM is typically 8-32GB these days, and you can use all of it. An old 32-bit Windows app can generally address around 2GB, but we've long since moved on to 64-bit, which has no such limitation.

Comment
Add comment · Show 1 · 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
avatar image xarismax · May 02, 2017 at 03:18 PM 0
Share

thank you, then it means it must be a problem with indie games that their developers didnt optimize. That's a reflief, because it means that scenes will be optimized without having to resort to asset packs.

avatar image
1

Answer by tanoshimi · May 01, 2017 at 01:51 PM

The whole point of a loading screen is that it's something simple to display to the user while the main body of a game is being loaded in the background. So it's not the "simple main menu with 4 buttons" that you can see that takes 2-4Gb of RAM - it's all the rest of the game, and 2-4Gb for a modern game doesn't seem too bad - most new systems come with 8Gb of RAM as standard, and gaming rigs often have much higher.

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

68 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 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

Is AssetBundle.LoadAllAssetsAsync more efficient than AssetBundle.LoadAssetAsync? 0 Answers

Best way to manage object memory/world streaming for large worlds nowadays? 0 Answers

How do Unity manage loading with inspector linkage? 0 Answers

Serialized class to google games services cloud save 0 Answers

Issues getting WWW.LoadImageIntoTexture to use DXT1 compression at runtime 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