UDP to triggers (Unreal)
Okay, so UDP is working and I'm receiving a bunch of information on a string. What now?
So the objective here is to connect this variables as triggers and connect them to the Unreal set up we had made before but transform the binary values that come in, into triggers.
First things first, the incoming values are a string on a comma separated value array and I need to separate every character into only numbers. On Received Bytes (The event that registers when new info comes in) outputs byte values that so far I have only transformed into Strings, trying to process the bytes as themselves doesn't really work since the result are a bunch of byte values of different magnitudes that represent the message, but not the message itself, so first I transform the Bytes array into String and use the Split function to remove both square brackets.
Then I use the Parse Into Array function to separate the values through the ", " comma and space separation, leaving a string array with only the numbers. This allows me to use a For Each Loop to send the information into an int array, Additionally I also had to create an empty array with all possible inputs available to be filled when the UDP sends a new message.
Comments
Post a Comment