Method TryResize
TryResize(int, NativeArrayOptions)
Attempt to set the length in bytes of this string. For NativeText.ReadOnly this function is a no-op and always returns false.
Declaration
public bool TryResize(int newLength, NativeArrayOptions clearOptions = NativeArrayOptions.ClearMemory)
Parameters
Type | Name | Description |
---|---|---|
int | newLength | The new length in bytes of the string. |
NativeArrayOptions | clearOptions | Whether any bytes added should be zeroed out. |
Returns
Type | Description |
---|---|
bool | Always false. |
Implements
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if ENABLE_UNITY_COLLECTIONS_CHECKS is defined. |