What is the best way to deep profile memory usage ?
Hi there,
Is there any good practices regarding memory profiling in Unity, excluding the Profiler ? We came to the conclusion that this tool is not very accurate, and we get different results based on the platform we are currently profiling.
I would like to know about the best way to profile mesh memory in my Unity app, are there any tool or C# techniques that can help in this regard ?
Thanks,
Answer by MartinTilo · Aug 23, 2019 at 06:18 PM
Hello, First of all, what Unity version are you using? For 2018.3 and up, we recommend to use the new Memory Profiler Package. As for best practices, you should always identify issues or areas of improvement while profiling on your target device, precisely because performance and memory usage can vary from platform to platform. Compression, 32 vs 64 bit, different GPU types (e.g. tilebased on Mobile) and generally different graphics drivers and backends, different system or unity internal allocators...
If there are any variances that the memory profiler shows, that look suspicious, please reach out to us. Data accuracy is important to us because we know that you need to be able to trust the tooling to make the best decisions for your game. If you're uncertain if it is a bug, you can start a thread in the Betas & Experimentals -> Profiler Previews subforum. If it looks suspicious to you, chances are it looks the same way to others and maybe we can find a way to surface the reasons for that in the tool itself. If it really is a bug though, we would eventually need a bug report, also since it could be a platform or area specific issue that we would have to hand over to the area or platform experts to fix.
Your answer
![](https://koobas.hobune.stream/wayback/20220612202239im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Profiler Stops Updating on Change Level 0 Answers
What causes ShaderLab memory to grow? 2 Answers
How to remove not saved memory - meshes? 0 Answers
How to free meshes from memory fast? 0 Answers