Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

We've started work on a new memory profiler

Discussion in 'Editor & General Support' started by Lucas-Meijer, Oct 3, 2015.

  1. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
    From: https://bitbucket.org/Unity-Technologies/memoryprofiler

    MemoryProfiler

    Unity 5.3a4 has a new very lowlevel memory profiler API. It can tell you which objects got blamed for how much c++ memory allocations. On IL2CPP platforms, it will also give you a dump of the entire c# heap, as well as c# type descriptions.

    This API is too low level for most people to benefit from. The intention is to write a much nicer UI window ontop of this API that will actually be readily useful for many users, in helping them figure out which objects are loaded, which objects take a lot of memory, and most important, why that object is in memory. This repository is that nicer UI window, very much in progress of being built.

    A common pattern of "memory leaks" that we see, is if you have a c# class with a static field, that contains a list, that has an object, which has a reference to a big Texture2D. This Texture2D will never be unloaded, because it is still reachable from C#. Figuring out this is the case is not very straightforward. This new memory profiler window will make it straight forward, and if you select the big Texture2D, it will show you a backtrace of references, all the way to the static c# field, (including the classname) that is causing this Texture2D to be loaded. (this only works on il2cpp platforms, as we need the whole il2cpp heap to do this backtracking)

    We have taken the, for us new, approach of shipping the low level API in the Unity product itself, and already opensourcing this memory profiler window long before it is "ready enough to be included in unity proper". We'll develop this window as an opensource project. Contributions are welcomed. At some point we'll feel that the feature is "good enough", at which point we'll most likely ship it out of the box with Unity.

    Today, the UI part of this feature is still very rough. We decided to opensource it anyway, as when your project is in a state of "we need to use less memory, what do we do now", you probably care alot more about finding your memory leaks today, then finding them 6 months from now with nicer buttons and user experience.

    Usage:
    • Make sure you're running Unity5.3a4 or later.
    • Build an il2cpp project & run it (any il2cpp platform should be fine).
    • Open the user project in this repository.
    • Open the normal profiler window.
    • Connect it to the player as you would normally profile.
    • Open the memory profiler window (Window->MemoryProfilerWindow)
    • Click "SnapShot".

    • or watch me do it in this video:

     
    Noisecrime, _met44, Meltdown and 13 others like this.
  2. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    193
    Oh snap. I actually googled recently looking for some kind of memory profiler. This will be great.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Is there going to be a snapshot diffing option ?
     
    Last edited: Oct 4, 2015
  4. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    Always great to have some low level API's! Any details on that API?
     
  5. noamgat

    noamgat

    Joined:
    Nov 22, 2009
    Posts:
    125
    Very exciting! I hope we see this become stable & il2cpp becoming active for more platforms so we can also use it for android etc.
     
  6. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    Any hope of this making it back into 4.6?

    A lot of mobile developers are still in 4.x, with pretty good reasons for staying away from 5.x for now.

    And the current profiler gives some unexpected/inconsistent stats when trying to investigate memory use on iOS, especially when compared with the XCode memory use figures.
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    What are the mobile issues in 5.x preventing your migration? that would be the most important thing for Unity afaik.
     
  8. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
    yeah, I documented them in the docs. it's not for the faint of heart though :)

    L
     
  9. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
    We'll probably make it work for mono as well. just need to find the time somewhere, and I didn't want to hold up this initial "release" for it.
     
    mdrotar likes this.
  10. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    I believe you can already use IL2CPP for Android in 5.2. At least in the betas you could, haven't yet switched to 5.2.
     
  11. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    The loss of Beast, really.

    Even if the new system was completely bug free (it's not - lightprobes have been broken for months - apparently fixed now, but the fix hasn't shipped yet), there's also the issue of having to relight and rebake a fairly large and lightmap-heavy game to make it work with the new system - and there's still a question of how lighting quality (and overall game performance) would compare with 4.x.
     
  12. BJO

    BJO

    Joined:
    Mar 25, 2013
    Posts:
    7
    Hi Lucas, thanks for the write-up and making this tool available, even in an early state. You mentioned that it's available in Unity5.3a4. Does that mean it's also available in 5.3.0b1? If not, where can we find a4?
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    a4 was the first build that had it available. b1 is newer than that, so it has it too.
     
  14. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    The new memory profile is revealing some interesting things.

    We make use a of a few singletons in our game - singletons that manage some parts of our UI (NGUI). For example, a ScoreboardUI script/singleton that exists in some game scene. In initial menu scene, the game UI atlas has not yet been loaded. When I load the game scene, the game atlas gets loaded, the ScoreboardUI script sets the singleton reference to it self, and the ScoreboardUI script updates some UI Labels to show the scores for the game. When I leave the game scene to go back to the menu scene, everything is destroyed, but the Memory Profiler reveals that the game UI Atlas has not been unloaded because the ScoreboardUI's static Instance field is referencing it (Indirectly - the Scoreboard UI references some UILabels which in turn reference the atlas but the shortest path to root is ScoreboardUI). The strange thing is, none of these objects exists anymore. Everything is already destroyed. The gameobject with the ScoreboardUI script is destroyed and the entire UI was destroyed too.

    Turns out I have to explicitly set the static ScoreboardUI.instance value to 'null' in the ScoreboardUI's OnDestroy method. When I do this, Unity releases the atlas correctly.
     
  15. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
    Hey Proddiga,

    I am very happy to read your post, as it is exactly scenarios like this that motivated us to make the memory profiler. As you can see, object lifetime management, across c++ and c# is non trivial, and can catch by surprise the most experienced developer. (both in the user community at large, but also developers working at unity). So I'm very pleased that the profiler was able to tell you what was going on, and made you realize how to fix it.

    Aside from that, a few words on the actual scenario of having to set the static variable to null here. What is going on, is that c++ objects' lifetime is managed explicitely (you can destroy a c++ object with Destroy(), or with loading a new scene). but c# object lifetime management is managed by the c# garbage collector, and it will only be destroyed once nothing references it anymore.

    "MonoBehaviour" is a funky component, in that it is part c++, but also part c#. so when you Destroy() a UI element (UI elements are implemented as MonoBehaviours), the c++ side is dead, but the c# side, including its fields that can reference other things, stays alive until nothing else references it.

    "Can we make this situation better?" is an interesting question. one thing we can do (in additional to providing additional diagnostics like the memory profiler does), is that if you Destroy() a monobehaviour component, we could choose to clear all the monobehaviours c# fields. (and fields in structs in fields). I'm reluctant to go there, mostly because of backward compatibility. today you can Destroy() a monoebehaviour, but continue to access its fields. I think that if we were to design things from scratch, I would indeed clear all fields on Destroy(). On that note, we area actively researching adding a "more modern" side-by-side alternative to MonoBehaviour, where we basically get to correct design "mistakes" (not 100% sure yet this one is a mistake, have to give it a bit more thought). I'll put it on the design agenda for this new class to discuss with the team if we should clear fields on Destroy().

    Bye, Lucas
     
    codestage likes this.
  16. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Thanks for the reply Lucas. We're trying to solve one of these issues right now. The memory profile just says one of our objects (an object that is DontDestroyOnLoad, not a singleton) is referencing the atlas material from the previous scene (And, in turn, that material is referencing a huge atlas). The strange thing is, this script has no material references (even though the memory profiler says it is referencing the material directly). I have no choice but to go through the script and just explicitly set anything that could be causing an issue to null when the scene changes.

    At least with this new memory profile I can build the game and take a memory sample to check if I fixed the problem.

    This is all making me realize just how, uhh, 'dangerous' DontDestroyOnLoad and static fields can be if you are not super careful.
     
  17. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
    Prodigga, Can you post a screenshot of the profiler where it says the material is referenced directly, and post the actual script in question that has no direct material references?
     
  18. Lucas-Meijer

    Lucas-Meijer

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    175
  19. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    @Lucas Meijer sure thing, tomorrow when I get in to work. I'll PM you the script but post here too in case others want to read your follow up as well.
     
  20. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    I am very happy to see this - I can tell you, if we had this in 4.x (I know it's not coming to 4.x) I'd make great use out of it, as I'm currently trying to track down what's holding rogue textures in memory after their objects (and scenes) got destroyed. A very useful tool this new memory profiler will be!
     
  21. Brian-FJ

    Brian-FJ

    Joined:
    Apr 23, 2013
    Posts:
    9
    Hi @Lucas Meijer could I get a link to this documentation please? I haven't been able to find anything myself. I've tried using MemorySnapshot.RequestNewSnapshot and comparing the instance ids of objects to detect the similarities but there are so many objects in the snapshot I suspect it's also reading objects in Editor prefabs that aren't loaded into the scene. That being a UnityEditor function I can't use it in a build either.

    Thanks for your help :)
     
  22. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    The documentation can be found in your editor installation folder on any 5.3 beta release.

    MemorySnapshot.RequestNewSnapshot captures snapshot from whatever you connected your profiler to before you call it. If you did not connect profiler to any player, it will capture data from the editor.
     
  23. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Yet another feature while a looong list of existing features do not work as advertised...? Thanks a lot....
     
  24. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    What exactly doesn't work?
     
  25. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    A random selection of things that really do not work as expected or advertised:

    http://forum.unity3d.com/threads/speedtree.364906/#post-2362216
    http://forum.unity3d.com/threads/substance-support-not-working-as-expected.256431/#post-2349933
    http://forum.unity3d.com/threads/shadow-fadeoff-approaching-far-clip-plane.356893/#post-2311360

    I could go on. How much time do you have?
    Now, please do FIX the things that we report before you add more new features that work so-so.
     
  26. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    I'm pretty sure the unity developer didn't want a smattering of other bugs with other areas of the engine, but rather a bug report or detailed description of the problems encountered with the memory profiler.
     
  27. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    @Foxxis: do we even have any open bug reports from you? Only one thread contains a case number from you, and that bug report was closed more than a year ago.
     
  28. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    I usually log bugs for every issue I encounter. Why would I not, and why do you seem to imply I do not? What kind of strange defence is that?
    I will have you know that out of the multitude of bugs I report I seldom get feedback and nor have the bugs been fixed in a timely manner. The substance problem is a year old or more. How do you think that affects the willingness to log bugs in the long term. I still log them, but when they are seldom fixed, I am starting to wonder why bother...?

    I respect that you do not want OT posts in this topic, and I apologise for it. But is extremely frustrating to get a feature announcement when there are so many things that need fixing before you head on to the next shiny feature. You might want to forward that to your project manager as I am sure I am not alone. There is even a thread in the beta forum urging you to slow down and fix what is broken.
     
  29. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    I appreciate it. You'd be surprised, but it's often the case that people don't file bugs, and instead just complain on forums.

    I'm sorry you feel that way, but reported bugs are getting fixed. You might not always get a personal reply when they get resolved, but trust me, we do spend a lot of time fixing bugs.

    As far as I can see, the bug in question was closed as "resolved" 6 days after you reported it.
     
  30. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Yeah, well. That goes to show how bug-fixing works, since it still did not work last time I tried. (Which was much later than the bug report date). I probably missed the closure/resolution message (if I even got one). But the sad part is that we actually ditched using substances since it was so unreliable in Unity.
    So, a feature that you marketed very heavily a while back was dropped by a paying customer since it did and does not work well enough for production. Same goes with Speed Tree. I know a lot of devs who have reverted back to the old trees or other home-brew options. Because the advertised SpeedTree support is just a quick hack, and not usable in the present state.

    How do you think that makes us feel? Paying for supposedly professional versions of the software and all too often learning that, oh no, the feature that looked as if it would elegantly solve a certain need does not, since it really does not work well enough or is buggy. Or both. Then you see new feature announcements while threads about problems and your bug reports go unanswered and not acted upon.

    Think about it.
     
  31. heroichippo1

    heroichippo1

    Joined:
    Mar 30, 2015
    Posts:
    36
    @Lucas Meijer: THANK YOU! Seriously, memory management is one of the things that often gets put to the side as prototypes get promoted to projects and production schedules ask for features.

    And as someone targeting WebGL for a significant chunk of business I'm really looking forward to using this.
     
  32. cory_munky

    cory_munky

    Joined:
    Dec 10, 2014
    Posts:
    66
    @Lucas Meijer: Thank you so much. Even in it's current janky state, this has already helped me fix several extremely obscure problems in our game.

    Did you know that Mono 2.0's standard lib SortedList has a bug where it retains a reference to the last item in the list even after you remove everything from the list? I do now! (Check out RemoveAt line 462) Our code was completely correct by inspection, the ref chain was extremely obscure and the old memory profiler just reported "Referenced by some static. Not gonna tell ya which one lol." Finding that leak would have been impossible before.
     
    Nition likes this.
  33. IcyHammer

    IcyHammer

    Joined:
    Dec 2, 2013
    Posts:
    71
    Anything new on the subject? I can't see the memory profiler anywhere on the roadmap :(
     
  34. Maeslezo

    Maeslezo

    Joined:
    Jun 16, 2015
    Posts:
    325
    Ey, such a great tool!

    We are using it right now looking for a 100 MB memory leak we have in each menu->scene-> menu loop. The tool is very useful, but, is there any way to compare between snapshots? Because visually is very difficult to find any different.

    Thank you
     
  35. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    What's the current status of this?

    I'm using it to profile a windows standalone build made with Unity 5.5.0p1, and the information I'm seeing doesn't appear to be accurate.

    According to the snapshot, there's a 2.7MB texture (splash-image) that's always in memory. The profiler states that it's referenced by a an object called 'CharacterButton', but that object should never reference that particular image.

    The gameobject that should reference this image (SplashPage) is created at the start of the game and then destroyed shortly after.

    Am I reading this wrong? Or is the info simply not correct?

    upload_2016-12-14_17-18-7.png
     
  36. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Is there any way to use this on a PS4/X1/PC project?

    Building for windows store has it's own troubles converting and taking a sample on PS4 crashes the PS4 right away (even in our main menu). Anyone else have success on X1/PS4?
     
  37. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Update: We made a windows 10 store build and profiled using that. The memory tool helped us find a leak that we would've never found otherwise (leaking 100mb every scene load).
    Thanks a lot for the tool, it's reaaly promising. Can't wait for il2cpp to be usable in normal standalone builds!
     
    SaraCecilia likes this.
  38. mespino

    mespino

    Joined:
    Nov 26, 2015
    Posts:
    15
    Hello,

    Is this project stopped? I say that because I am using it and I have seen this video


    In it, @Lucas-Meijer uses a very interesting feature, Reference Chain, that I can not find in the bitbucket project. Moreover, I have seen interesting features in branches, like spreadsheet, but not merged.

    So I do not know if this project is abandoned.

    I hope not, because it is a great tool, but it feels like not completed.

    Regards
     
    Last edited: Feb 7, 2017
  39. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    This is exactly the kind of tool we need. Too bad it only works for IL2CPP platforms. Is there anything similar for mono backend?
     
  40. rkoshak

    rkoshak

    Joined:
    Dec 1, 2014
    Posts:
    9
    Hello,
    I am using 5.5.0f3. I assume this tool should still work?

    I cannot get any data out of it. I get a couple of asserts, a lot, maybe thousands of warnings and end with with an index out of range error.

    Asserts:
    Code (CSharp):
    1. Assertion failed on expression: 'kSnapshotRuntimeInfoMagicBytes == magicBytes'
    Sample Warnings:
    Code (CSharp):
    1. Exception parsing object header. Skipping. System.ArgumentException: Unexpected pointersize: 0
    2.   at MemoryProfilerWindow.BytesAndOffset.ReadPointer () [0x0005d] in /Projects/Unity-Technologies-memoryprofiler-40911eb35d1d/Assets/Editor/BytesAndOffset.cs:20
    3.   at MemoryProfilerWindow.Crawler.ParseObjectHeader (MemoryProfilerWindow.StartIndices startIndices, UnityEditor.MemoryProfiler.MemorySection[] heap, UInt64 originalHeapAddress, System.UInt64& typeInfoAddress, System.Int32& indexOfObject, System.Boolean& wasAlreadyCrawled, System.Collections.Generic.List`1 outManagedObjects) [0x00011] in /Projects/Unity-Technologies-memoryprofiler-40911eb35d1d/Assets/Editor/Crawler.cs:231
    4.   at MemoryProfilerWindow.Crawler.CrawlPointer (UnityEditor.MemoryProfiler.PackedMemorySnapshot packedMemorySnapshot, MemoryProfilerWindow.StartIndices startIndices, UInt64 pointer, Int32 indexOfFrom, System.Collections.Generic.List`1 out_connections, System.Collections.Generic.List`1 out_managedObjects) [0x00037] in /Projects/Unity-Technologies-memoryprofiler-40911eb35d1d/Assets/Editor/Crawler.cs:176
    5. UnityEngine.Debug:LogWarningFormat(String, Object[])
    6. MemoryProfilerWindow.Crawler:CrawlPointer(PackedMemorySnapshot, StartIndices, UInt64, Int32, List`1, List`1) (at Assets/Editor/Crawler.cs:180)
    7. MemoryProfilerWindow.Crawler:Crawl(PackedMemorySnapshot) (at Assets/Editor/Crawler.cs:31)
    8. MemoryProfilerWindow.MemoryProfilerWindow:IncomingSnapshot(PackedMemorySnapshot) (at Assets/Editor/MemoryProfilerWindow.cs:165)
    9. UnityEditor.MemoryProfiler.MemorySnapshot:DispatchSnapshot(PackedMemorySnapshot)
    Code (CSharp):
    1. Skipping field Empty on type System.String
    2. UnityEngine.Debug:LogWarningFormat(String, Object[])
    3. MemoryProfilerWindow.Crawler:CrawlRawObjectData(PackedMemorySnapshot, StartIndices, BytesAndOffset, TypeDescription, Boolean, Int32, List`1, List`1) (at Assets/Editor/Crawler.cs:153)
    4. MemoryProfilerWindow.Crawler:Crawl(PackedMemorySnapshot) (at Assets/Editor/Crawler.cs:36)
    5. MemoryProfilerWindow.MemoryProfilerWindow:IncomingSnapshot(PackedMemorySnapshot) (at Assets/Editor/MemoryProfilerWindow.cs:165)
    6. UnityEditor.MemoryProfiler.MemorySnapshot:DispatchSnapshot(PackedMemorySnapshot)
    Final Error:
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. MemoryProfilerWindow.CrawlDataUnpacker.Unpack (MemoryProfilerWindow.PackedCrawlerData packedCrawlerData) (at Assets/Editor/CrawledDataUnpacker.cs:35)
    3. MemoryProfilerWindow.MemoryProfilerWindow.Unpack () (at Assets/Editor/MemoryProfilerWindow.cs:154)
    4. MemoryProfilerWindow.MemoryProfilerWindow.IncomingSnapshot (UnityEditor.MemoryProfiler.PackedMemorySnapshot snapshot) (at Assets/Editor/MemoryProfilerWindow.cs:166)
    5. UnityEditor.MemoryProfiler.MemorySnapshot.DispatchSnapshot (UnityEditor.MemoryProfiler.PackedMemorySnapshot snapshot) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Profiler/MemorySnapshot.cs:24)
    Is there something simple I am doing wrong? I'd cant package this project and send a bug. I will try it out on a smaller, sample/empty project for comparison.

    Thanks!
     
  41. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    Hey @Lucas-Meijer, @Tautvydas-Zilys, can we get a word from Unity in this thread? It seems people are having a few issues with the tool and it's unclear if Unity is still supporting it.
     
  42. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    It's still working for us on PS4 (Unity 5.5.2)

    We couldn't have solved our memory issues without it, I do hope Unity realizes this should be a built-in feature and get some higher priority.
     
  43. SullyTheStrange

    SullyTheStrange

    Joined:
    May 17, 2013
    Posts:
    147
    Tried this with Unity 5.3.4p6 and 5.4.0f3, but I get an error when opening the bitbucket project: "The type or namespace name 'Profiling' does not exist in the namespace 'UnityEngine'." throughout PackedMemorySnapshotUtility.cs. What version am I supposed to be using for this to work? Or, how would I fix that error?
     
  44. capkoh

    capkoh

    Joined:
    Oct 1, 2016
    Posts:
    24
    Hi,

    I'm running Unity 5.5.1f1 and try to use MemoryProfiler but failed to see allocations like huge arrays of ints or classes. Looking through sources I've found that typeDescriptions field of PackedMemorySnapshot does not contain anything, it is empty. As far as I know the only way to find that the object is an array is to use TypeDescription.isArray property, but there is nothing in typeDescriptions.

    Could it be the reason why I can not see int arrays in MemoryProfiler?
     
  45. mikael_juhala

    mikael_juhala

    Joined:
    Mar 9, 2015
    Posts:
    247
    Finally had a chance to use this tool and it worked nicely (in Unity 5.5.2p4). Was quite easy to find assets that required optimizing.

    One odd thing though: One object was listed as having a reference to a certain texture, but it (and its children in the hierarchy) only referenced fonts. Either there actually is a reference somehow or I'm just reading it wrong.
     
  46. capkoh

    capkoh

    Joined:
    Oct 1, 2016
    Posts:
    24
    Downloaded 5.6.0f1 and faced the same issue. TypeDescriptions is empty. I remember that I was able to see arrays of any objects in new memory profiler before (in 5.3.6f1) and it was really helpful. But now I allocate an 25 MB int array and see nothing about it in memory profiler.

    So, I suppose that now memory profiler shows to me just Assets and objects that use UnityEngine.Object as base type. That's really disapponting.
     
  47. capkoh

    capkoh

    Joined:
    Oct 1, 2016
    Posts:
    24
    So, I've finally found what I did wrong. After installing new Unity I forgot to set IL2CPP backend. But after building on Android device MemoryProfiler failed to get a snapshot at all (I can see stats in regular Profiler from device). I used Unity 5.6.0f1 and Meizu MX3. Seems like there is still no Android support.

    Is there a way to participate in New Memory Profiler intiative actively? :)
     
  48. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hey,

    I'm trying this on iPhone 6 with Unity 5.5.0f1 and everything connects as per the video. After I click Snapshot the profiler pauses a bit and then continues - but I don't see anything else displayed in the Profiler window i.e. nothing gets displayed - no grid no anything - even if I leave it for 20 minutes or so.

    Does anyone have any ideas as to why this could be and what I may be able to do to fix it?

    thanks

    Nalin
     
  49. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    The info the profiler gave me was so wacko I don't think you're missing out on much.
     
  50. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    515
    Why couldn't you provide a package for it? Tried to add it to my project, but it doesn't work if I put content to custom directory in Editor folder. Looks like it should be only in Assets folder... Very uncomfortable