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 ludo_ics · May 21, 2015 at 09:33 AM · androidprofilerexplanation

explanation about Profiler

Hello everyone

I've created an application for android which use the Vuforia plugin (version 3.0.9) for showing some 3d model for 25 frame markers.

After using the application for a relative long period of time my application become really slow and cannot really use it after (display bug appear).

I guess I have some memory leak so after searching on the internet and into the unity3d portal I saw that Profiler give a lot of information about memory, CPU, GPU and so on.

I've already read the document about Profiler (http://docs.unity3d.com/Manual/Profiler.html) but I don't a understand a thing about detecting memory leak.

I may be stupid but I don't know how to interpret the result I get on the Profiler.

Basically, what I would like to detect is if some parameter have a memory leak issue and/or if a specific texture use more and more memory when changing its texture (I'm using Resources.Load<>()).

I've already tried to use System.GC.Collect() in some part of my code and use Resources.UnloadUnusedAssets() without any result.

Could you please explain to me simply how can I use Profiler for detecting memory leak?

ps:I have both Unity pro for pc/mac and android and running the Profiler using the Editor.

I really thank you in advance for your help.

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

2 Replies

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

Answer by Graham-Dunnett · May 21, 2015 at 09:33 AM

Use the detailed view:

http://docs.unity3d.com/Manual/ProfilerMemory.html

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 ludo_ics · May 21, 2015 at 02:09 PM 0
Share

thank you for your answer. I've already tried to used the detailed view and clicking on the "take sample" but I didn't any particular memory trouble. However I don't understand message like "hide and save" of something like this. What I would like to check/be able to see is the memory used for each texture of all my UI Image.

In my canvas I have a lot of Image and for quite a lot of them I'm changing their texture using Resources.Load();

However I really don't understand the reason of the memory trouble because in my project I have 4 scene. The first scene is just a simple image acting a splash screen. The second screen do nothing in particular, I'm just checking user tap event for loading the scene 3 but the strange thing is that in this second scene, sometime, if I wait a couple of $$anonymous$$ute I'm already having memory issue.

I'll retry tomorrow to use Profiler but I have some difficulty to understand all data.

In the tutorial part of this website, is a tutorial on the use of Profiler scheduled?

avatar image
0

Answer by ludo_ics · May 22, 2015 at 09:33 AM

Following the advice of M. Graham Dunnnett, I've checked the memory part with Detailed but something is bugging me and I don't understand the result.

From what I've seen: -Other : doesn't really change, stay at 0.58GB (once at 0.59GB but returned to 0.58GB)

-Assets : this is the one I don't understand, globally growing up, start at 380.4Mb when appli just start, grow up when changing Texture/sprite (first grow was about 570Mb) then after finishing the AR part, I'm calling Resources.UnloadUnusedAssets (); then System.GC.Collect() but the memory didn't "returned" to 380.4Mb, memory was around 401Mb so the more I'm playing with the camera/AR part the more the Assets memory grow up.

-Not saved : doesn't really change, at start the memory is around 42Mb and after some use it grows up a little (45.5Mb)

-Scene memory : doesn't change, stay around 16.2Mb

-Builtin Resources : doesn't really change, stay around 14.4Mb and 15Mb

(memory test was done using the Editor with the plateform set to Android)

so my problem concern the "Assets" part but I don't understand why the memory still keep growing event after the call of Resources.UnloadUnusedAssets (); and System.GC.Collect()

Do I missed something when trying to release memory?

When changing a texture I'm doing it this way:

  Texture myTexture = (Texture)Resources.Load("05/maps/"+texname);
  item.material.mainTexture = myTexture;

Is there something wrong with this way of changing texture?

I really thank you in advance for your help

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

2 People are following this question.

avatar image avatar image

Related Questions

Profiler Alpha Mobile 0 Answers

Android Development Build Crashing After Splashscreen 2 Answers

Android build not running at target frame rate: Semaphore.WaitForSignal 0 Answers

Creating Unity Plugin 1 Answer

[UI] Profiler scroll rect 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