Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Tomza · Oct 24, 2014 at 07:00 AM · memory-leak64-bitmemory usageplay-mode

Memory Leak in Play Mode

I use Unity 4.6 Beta for making my project. When I use it on Windows 7 32 bit (PC), I have no problems. But I need to work on my new laptop with Windows 8.1 64 bit, so I transferred the project (64 bit) there and I have a serious problem with memory. When I click Play, Unity slowly consumes more and more memory. It consumes almost 3 GB of memory ( I have 4 GB on my laptop). It lasts very long (an hour or more) to go into Play Mode. But it is happening only when I click Play for the first time, then it goes in Play Mode normally. When in Play Mode, the used memory is 500 MB memory only. It happens with all scenes in the project. My project is very big - about 80 GB.

I made an empty project and click Play. Unity goes into Play Mode quickly without problems. Is it possible that some of my assets makes this problem. And maybe the Unity Beta? But I don't experience that on my Windows 7 where I use the same project and the same Unity.

After having transferred the project to my laptop, I rebuilt (reimported)the project three times - no improvements. No problem when Unity isn't in Play Mode.

I wish to know if somebody has such a problem.

My computer details:

OS Name Microsoft Windows 8.1

System Manufacturer ASUSTeK COMPUTER INC.

System Model X551MA

System Type x64-based PC

Processor Intel(R) Pentium(R) CPU N3520 @ 2.16GHz, 2159 Mhz, 4 Core(s), 4 Logical Processor(s)

Name Intel(R) HD Graphics

Comment
Add comment · Show 18
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 Baste · Oct 24, 2014 at 08:35 AM 0
Share

80 GIGS OF DATA?

That's impressive. Unity always takes a bit extra time to go into play mode the first time after you start it, but this is a bit overkill.

avatar image Tomza · Oct 24, 2014 at 09:48 AM 0
Share

EXACTLY! 80 GB of data. I have no problem on Windows 7 32 bit. Going into Play $$anonymous$$ode is much more quickly. When I start Unity and no in Play $$anonymous$$ode, Unity uses over 600 $$anonymous$$B of memory. As soon as i click Play, the memory is going up slowly. About 2 $$anonymous$$B per second. I am forced to wait until the memory will go to 2.7 or 2.8 GB to be in Play $$anonymous$$ode. It lasts a long time. I think the problem is in Windows 64 bit, because Unity is 32 bit, so there's time needed for translation. But it's too long. I don't know maybe the stable Unity 3D 4.6 will be faster. i hope Unity 5.0 64 bit will solve all such problems.

avatar image Tomza · Oct 24, 2014 at 10:16 AM 0
Share

Now Unity is going into Play $$anonymous$$ode in 35 $$anonymous$$utes and with 2.2 GB of memory. It's still too long I think.

avatar image Baste · Oct 24, 2014 at 01:14 PM 0
Share

How long is your startup time when building?

avatar image KayelGee · Oct 24, 2014 at 01:15 PM 1
Share

It's pretty hard to say if this is a bug in Unity or if it is one of your assets as we don't have any information from you except that your project is 80 GB big.

I'm not sure I understand you correctly. Is Unity using up that much memory before Play mode starts and once Play mode is actually done loading the memory gets freed?

What kind of assets are you using that your project is so big? Are your models fbx files? Do you have modeling software on your PC but not on your laptop or to make the question more general: Do you have the exact same software on your laptop and your pc installed?

If the memory goes down after Play mode starts then I don't think that this is a memory leak but ins$$anonymous$$d Unity is importing some of your assets or recompiling the code or whatever. Especially because you said that the memory usage goes up by around 2$$anonymous$$B/sec which might be the speed your harddrive is loading the data into memory.

You would need to profile the editor somehow to know where the memory usage comes from but I don't know if that is possible. You might want to ask the Unity tech support.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Asthegor · Oct 25, 2014 at 06:39 AM

The first thing to do is : remove all resources useless !!! Like materials, textures, sounds, ...

Another thing : if you use the OnGui function, move all coord calc to the Start function for static buttons/labels/etc...

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 Tomza · Oct 25, 2014 at 06:52 AM 0
Share

Thanks for your answer.

I use New GUI, so there's no OnGUI functions.

I know I can remove all useless resources, but the problem is that my project works well on PC (Windows 7) with all resources. I am building a big and complicated project so I need a lot of those materials, textures, sounds,...

I think useless resources are removed by Unity and only those on the current scene are used in Play $$anonymous$$ode.

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

29 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

Related Questions

Sub-emitter memory leak? 3 Answers

Unity using too much memory on mac 0 Answers

Could not allocate memory: System out of memory! MemoryLabel: Animation 0 Answers

Memory leak for using Emgucv facedetection function. 0 Answers

Different memory usage from pc profiler and android profiler - Memory leak 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