| Parameter | Description |
|---|---|
| areaName | The name of the memory area. |
| objectName | The name of the object being labeled. |
| allocator | The allocator to use. Defaults to Allocator.Persistent. Only Allocator.Persistent and Allocator.Domain support memory labeling. |
MemoryLabel The created memory label.
Creates a memory label with the specified area name, object name, and allocator.
This method can be used in Burst-compiled code with names that are not compile-time string literals.
Attempting to create a memory label with empty strings for the area name or object name, or with an unsupported allocator, throws an exception.