ZString
ZString copied to clipboard
Add Unity FixedString support to string builders
This pull request makes the assembly definition aware of the Unity.Collections package and, if available, enables AsFixedStringXXBytes on both Utf8ValueStringBuilder and Utf16ValueStringBuilder.
There are checks in place to make sure the length of the buffer does not exceed what FixedStringXXBytes supports. They will throw InvalidOperationException if the byte count is exceeded.
This was needed as it helps with the ECS migration in Unity. Unity's Netcode for GameObjects can also benefit from it.