{"id":4504,"date":"2022-09-05T16:14:20","date_gmt":"2022-09-05T08:14:20","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=4504"},"modified":"2022-09-05T16:14:20","modified_gmt":"2022-09-05T08:14:20","slug":"unity-memory-profiler","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=4504","title":{"rendered":"Unity Memory Profiler"},"content":{"rendered":"\n<p>\u4e00\u3001\u5b89\u88c5\u63d2\u4ef6<\/p>\n\n\n\n<p>\u5728Package Manager\u4e2d\uff0c\u627e\u5230Memory Profiler\uff0c\u5b89\u88c5<\/p>\n\n\n\n<p>\u4e8c\u3001\u5728\u4ee3\u7801\u4e2d\uff0c\u5bfc\u51fa\u5185\u5b58\u5feb\u7167<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var filename = System.DateTime.Now.ToString(\"yyyyMMddHHmmss.snap\");\nUnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(filename, OnHeapReceivedSaveOnly);\n\nprivate static void OnHeapReceivedSaveOnly(string path, bool captureResult)\n{\n}<\/code><\/pre>\n\n\n\n<p>\u4e09\u3001\u6784\u5efaAndroid\u5305\u7684\u65f6\u5019\uff0c\u4f7f\u7528Development\u6a21\u5f0f\u6784\u5efa<\/p>\n\n\n\n<p>\u56db\u3001\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0c\u8c03\u7528\u4ee5\u4e0a\u4ee3\u7801\uff0c\u89e6\u53d1\u4fdd\u5b58<\/p>\n\n\n\n<p>\u4e94\u3001\u6253\u5f00 Windows \/ Analysis \/ Memory profiler\uff0c\u5206\u522b\u5bfc\u51652\u4e2a\u5feb\u7167\u6587\u4ef6<br>\u7136\u540eCompare Snapsshots<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b89\u88c5\u63d2\u4ef6 \u5728Package Manager\u4e2d\uff0c\u627e\u5230Memory Profiler\uff0c\u5b89\u88c5 \u4e8c\u3001\u5728\u4ee3\u7801\u4e2d\uff0c\u5bfc\u51fa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4504"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4504"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4504\/revisions"}],"predecessor-version":[{"id":4505,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4504\/revisions\/4505"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}