Thursday, February 29, 2024
HomeGame Developmentunity - Learn how to mix an listing of strings right into...

unity – Learn how to mix an listing of strings right into a string with out a separator


I’ve a Record of Strings, and I need to mix it right into a single string.

So for instance, if my Record appears to be like like this:

0: "s"
1: "t"
2: "r"

I want to mix this Record of Strings into the only string: “str”.

I could not discover a approach to do that in Unity Visible Scripting with out utilizing a separator string. So I attempted utilizing String Be a part of with a ” ” separator, after which utilizing String Substitute to interchange the ” ” with an empty string. That labored effectively, till I encountered this bug (the “e” string turns into an “st”).

enter image description here

I believe the error is tied by some means to the immutable nature of strings, mixed with some form of human error on my half.

Is there a less complicated solution to mix a Record of Strings right into a single String, with out utilizing a separator string?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

Arnavsijapati on Planet of Lana – Beta Demo
Jai Kishor Upadhyay on Planet of Lana – Beta Demo