Passing large strings from C# to C++ via Actor.Invoke()
#159
-
Hey there again! I'm trying to figure a good way to pass structs from C# to Cpp. One approach I've been using is to serialize my C# object to a JSON string before passing it to cpp via Actor.Invoke. Once in Cpp I can deserialize using ue's regular Json deserialization methods. This works really well for smaller structures but when trying to pass a larger data structure to cpp I get a UnrealFramework.StackOverflow error. Whilst this is not ideal, I've tried to avoid the StackOverflow by sending the serialized string in chunks but this turns out to open a can of worms as I start getting other errors when trying to interact with the actor that I've invoked my functions - This seems quite intermittent so I'm worried about using this and would opt for a cleaner way of passing the data if there is one. The string I'm trying to pass has a char length of roughly 73383 characters. Does anyone think there's a better way to pass a structure like this across? Would be super appreciative if anyone has ideas of how to allow this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sorry, I've just noticed this is actually an issue in my own code. Passing the my large string is actually working well. |
Beta Was this translation helpful? Give feedback.
Sorry, I've just noticed this is actually an issue in my own code. Passing the my large string is actually working well.