ZString icon indicating copy to clipboard operation
ZString copied to clipboard

Add Unity FixedString support to string builders

Open Hertzole opened this issue 2 months ago • 1 comments

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.

Hertzole avatar Oct 11 '25 20:10 Hertzole