This really helps me!
So awesome reflection in Unreal ![]()
I going to also remake my JSON → UStruct conversion code. Is there any nuaces with it?
Can I use ImportText instead ExportText_Direct?
Thank you, Jamie! Very cool.
UPD: ScriptArrayHelper.EmptyAndAddValues(JsonArray.Num()); got crash ![]()
UPD2: ScriptMapHelper.AddDefaultValue_Invalid_NeedsRehash() and ScriptMapHelper.Rehash() is true way to construct TMap?
UPD3: I do it! But… I got strange consequences. After exit from my function editor was crashed: Access Violation at address 0x00007FFD57E03AF8 (UE4Editor-SlateCore.dll) in UE4Editor.exe: 0xC0000005 read of address 0xFFFFFFFFFFFFFFFF
And after retry exception was raised again, but deffers
(selected line is exit of my method, without specified entry, destructor?)
I understand, I’m doing something wrong with writing data. Maybe this is my Map and/or Array iteration with writing to forbidden address. So I used method above.
For adding new item to arrays I used ScriptArrayHelper.AddValue() and writing data to GetRawPtr() to this item index after.
UPD4: Finally I solve the problem. I used ContainerPtrToValuePtr with values at some place in code. It was incorrect.
But what about ArrayDim I’m not understood…
Strange moment ContainerPtrToValuePtr with values gives me bug only with TMap, with the TArray this not observed.