Method AllocateString
AllocateString(ref BlobBuilder, ref BlobString, String)
Allocates memory to store the string in a blob asset and copies the string data into it.
Declaration
public static void AllocateString(this ref BlobBuilder builder, ref BlobString blobStr, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| BlobBuilder | builder | The BlobBuilder instance building the blob asset. |
| BlobString | 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. |
| String | value | The string to copy into the blob asset. |
AllocateString<T>(ref BlobBuilder, ref BlobString, ref T)
Allocates memory to store the string in a blob asset and copies the string data into it.
Declaration
public static void AllocateString<T>(this ref BlobBuilder builder, ref BlobString blobStr, ref T value)
where T : INativeList<byte>
Parameters
| Type | Name | Description |
|---|---|---|
| BlobBuilder | builder | The BlobBuilder instance building the blob asset. |
| BlobString | 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. |
| T | value | The string to copy into the blob asset. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of native container that contains the source string |