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
0
Question by zeropoint · Dec 12, 2011 at 07:02 AM · memoryresourcesscene loadlow fps

Low FPS after loading a scene

There are two scenes, say, s1 and s2. Now s2 runs fine with full fps when it's the only scene built and loaded, but when both s1 & s2 are built, and i transit from scene s1 to s2 using Application.LoadLevel(), there is considerable fall in fps in s2 !

Now `Application.LoadLevel()` says


'When loading a new level all game objects that have been loaded before are destroyed. ...'


Then what could be the reason for low fps in s2 ?

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
2
Best Answer

Answer by flamy · Dec 12, 2011 at 11:17 AM

static variables and game objects in s1

also the scene wont be released from the memory if there are static variables in it(not sure though, heard something like that).

Also Don't destroy on load variables or gameobject will be in the memory still!! one of these shd be ur problem.

Thing is ur scene one is in the memory still.... check the ram usage for both the builds u will get something!!

Comment
Add comment · Show 5 · 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 zeropoint · Dec 12, 2011 at 01:10 PM 0
Share

Thanks flamy for the input. Of all cases, only static variables can be a problem (others not used), but i don't think entire scene objects remain occupied in memory for even one static variable in one script! Actually I am already destroying all the gameobjects from scene s1 except the one holding the only script in the scene s1.

avatar image flamy · Dec 12, 2011 at 01:16 PM 1
Share

ya even i checked that it is not the entire scene that will remain in memory...

btw did u check the memory usage of the two builds? it would make a lot of things clear!

avatar image zeropoint · Dec 12, 2011 at 01:43 PM 0
Share

checked the mem. details, diff. is negligible enough or almost nil -- so most probably nothing stays back from s1 while we're in s2

avatar image flamy · Dec 12, 2011 at 07:48 PM 0
Share

hmm i dont knw if it will work... add a empty scene in between and load the s2 scene after some time(may be 2 or 3 secs)?!

avatar image zeropoint · Dec 13, 2011 at 04:11 AM 0
Share

ahh that was the first thing i did as a measure with GC.Collect() in it :) That was a relief but still did not turn out to be a complete solution

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Loading a Random Resource in a Folder Without Using Resources.LoadAll 0 Answers

When are resources outside the resource folder in memory? 2 Answers

Long load time for scene... Some optimization questions. 1 Answer

Multiple calls of Resources.Load for the same resource 1 Answer

Best way to handle 100+ sound files 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