Documentation

Unity Engine


Unity Engine


AllocateString

Allocates memory to store the string in a blob asset and copies the string data into it.
Read time 1 minuteLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

AllocateString(BlobBuilder, BlobString, string)

Allocates memory to store the string in a blob asset and copies the string data into it.
public static void AllocateString(this ref BlobBuilder builder, ref BlobString blobStr, string value)

Parameters

The BlobBuilder instance building the blob asset.

blobStr

A reference to the field in the blob asset that will store the string. This function allocates memory for that field and sets the string value.

value

The string to copy into the blob asset.

AllocateString<T>(BlobBuilder, BlobString, T)

Allocates memory to store the string in a blob asset and copies the string data into it.
public static void AllocateString<T>(this ref BlobBuilder builder, ref BlobString blobStr, ref T value) where T : INativeList<byte>

Parameters

The BlobBuilder instance building the blob asset.

blobStr

A reference to the field in the blob asset that will store the string. This function allocates memory for that field and sets the string value.

value

T
The string to copy into the blob asset.