ドキュメント

Unity Engine

Unity Engine

Create(FixedString32Bytes, FixedString64Bytes, Allocator)

Creates a memory label with the specified area name, object name, and allocator.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public static MemoryLabel Create(FixedString32Bytes areaName, FixedString64Bytes objectName, Allocator allocator = Allocator.Persistent)

Parameters

The name of the memory area.

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.

Returns

Type

Description

MemoryLabelThe created memory label.

Remarks

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.