AllocateString
Allocates memory to store the string in a blob asset and copies the string data into it.
阅读时间1 分钟最后更新于 19 天前
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.
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.
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.
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.