Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Caiman · Aug 21, 2010 at 07:57 PM · gameobjectscenememorylevelmanagement

good resource about conserving memory when multiple levels share resources?

Hello, I've been working on a game for awhile now, and I have run into questions about memory management.

I'm looking for a good reference about conserving memory in Unity3d and can't find one. Any links/suggestions?

Specific questions: when an asset is in the hierarchy, but its checkbox is deselected, what does that mean, memory wise? Does it not consume memory until the box is checked? Or is it loaded on startup and then is merely placed in the scene when the box is checked?

The reason I ask is because I'm trying to design multiple levels in a game that reuses assets from level to level. Would it be inefficient to have GameObject containers for each level that are turned on and off? Or should I create and instantiate them through a script when appropriate? I originally was using different scenes to take care of everything, but then a lot of stuff is duplicated, and I heard that doing so leaks memory on iPhone. Is this true as of 8/21/10?

To clarify some things about the game that might help you guys let me know: it's a puzzle game, so a lot of assets are common to each level, just placed in different locations. I'm also procedurally generating a bunch of meshes per level.

Finally: I don't have Unity Pro.

Thanks guys! off topic: If you want to see the game and offer feedback, please let me know.

Jon

Comment
Add comment · Show 3
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 spinaljack · Aug 21, 2010 at 10:16 PM 0
Share

If you're suggesting you have every level in a single scene then I wouldn't recommend it. Loading scenes unloads unused assets so there's no memory worries there. If you wanted to save objects between scenes you can set DontDestoryOnLoad(gameObject) on it.

avatar image Caiman · Aug 24, 2010 at 07:02 AM 0
Share

Hi, I'm currently using GameObject containers to hold all of the assets of each level, turning the containers on and off as needed. $$anonymous$$ost of the objects are duplicated from level to level. Is this inefficient?

Thanks

avatar image ronronmx · Jan 23, 2012 at 06:16 PM 0
Share

I have the same question about the checkbox selected/deselected feature and memory management, so hopefully someone can clarify what exactly happens memory wise in these cases.

Now, about having all of your assets loaded in GameObject containers for all your levels, I'm pretty sure this isn't a good thing. You say you have lots of duplicated content between your levels, so you should be using prefabs for all those assets! Don't just duplicate them, create prefabs and re-use those, and use different scenes for your levels :)

0 Replies

· Add your reply
  • Sort: 

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

1 Person is following this question.

avatar image

Related Questions

Enter next level 1 Answer

memory management strategy 0 Answers

Load a scene/level when enemy is close... 1 Answer

How to keep count of enemies left 2 Answers

How to restart a "prefab'd" level? ;) 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