文档

Unity Engine

Unity Engine

NativeAllocations

Specifies that the Native Memory used by any Native Allocation made by Unity should be captured.
阅读时间1 分钟最后更新于 1 个月前

Definition

NativeAllocations = 4

Remarks

This information allows the Memory Profiler to show not just the native size of Unity Objects, but also their graphics sizes. Additionally, this also includes information on native memory used by Unity's different subsystems, allocations made via UnsafeUtility.Malloc, NativeArray<T> or other native collections, as well as how much memory is used by Unity's different native allocators and how much is just reserved. Without this flag, there will be no data recorded for CaptureFlags.NativeAllocationSites or CaptureFlags.NativeStackTraces either as it is reported in relation to each native alloation.
Corresponds to the NativeAllocations, NativeMemoryRegions, NativeRootReferences, and NativeMemoryLabels fields in a Memory Snapshot.