Some questions about USTRUCT
Hello community, I would like to get a hand of help for my problem, so I'll start:
Let's suppose I have 10.000 assets of Texture2D Type, and I included them all in an Object Library called icons
Then I have defined a USTRUCT that have data like :
Then the problems comes that in my actual imported Datatable with that UStruct .json, I would have the actual data stored in following format.
So when I import the json file as a datatable in UE4, I need that string of format [Package.AssetName] to be transformed in Texture2D Found in that Object library?
I am not sure if that make sense...
But anyway I imagine it like this, that inside the USTRUCT derived from FTableRowBase there would be some sort of a constructor method, that would parse the json data entries that I need in some kind of [Package.Asset] Format, and later on I could Search in the ObjectLibrary and assign to the icons array UTexture2D that was found in that object Library.
Am I on the correct path guys? Thanks a lot!
Assets strings are stored in strings in form of path, the same one which is copy when you click "Copy Reference", this is what is used in ini config and data table importing. to get it in C++ call GetPathName:
And then you can get object using either soft object pointers:
or direcly from asset regestry
answered Jun 23 '18 at 10:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here