Niubility
Niubility

Reputation: 577

Unity3d development, how can I know how much memory of system is unused?

I want to know this to debug my app. I deeply suspect it's the lack of memory that caused the app crashed. Thanks!

Upvotes: 0

Views: 1461

Answers (1)

Andrea
Andrea

Reputation: 6125

You should use the Profiler. Here, the section dedicated to memory.

An extracted from the documentation (Simple mode):

enter image description here

The Simple view shows a simple overview how memory is used throughout Unity in real-time on a per-frame basis. Unity reserves memory pools for allocations in order to avoid asking the operating system for memory too often. This is displayed as a reserved amount, and how much is used.

The areas covered by this are:

  • Unity The amount of memory tracked by allocations in native Unity code
  • Mono The total heap size and used heap size used by managed code. This memory is garbage-collected
  • GfxDriver The estimated amount of memory the driver is using on Textures, render targets, Shaders and Mesh data.
  • FMOD The Audio driver’s estimated memory usage
  • Profiler Memory used for the Profiler data

Upvotes: 3

Related Questions