x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 :

alt text

Then the problems comes that in my actual imported Datatable with that UStruct .json, I would have the actual data stored in following format.

alt text

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!

Product Version: UE 4.19
Tags:
1.png (6.5 kB)
2.png (5.1 kB)
more ▼

asked Jun 23 '18 at 10:39 AM in C++ Programming

avatar image

One.Thunder
6 1 2

avatar image One.Thunder Jun 26 '18 at 02:46 PM

Any other help guys?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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:

http://api.unrealengine.com/INT/API/Runtime/CoreUObject/UObject/UObjectBaseUtility/GetPathName/1/index.html

And then you can get object using either soft object pointers:

https://docs.unrealengine.com/en-us/Programming/Assets/ReferencingAssets

or direcly from asset regestry

http://api.unrealengine.com/INT/API/Runtime/AssetRegistry/FAssetRegistryModule/index.html

more ▼

answered Jun 23 '18 at 10:00 PM

avatar image

Shadowriver
36.7k 932 169 1111

avatar image One.Thunder Jun 24 '18 at 07:32 AM

Thanks man for the info, but I believe I explained it not really well or I didn't understand your response, so what if I NEED to store the the asset name in my json NOT in the following form :

Texture2D'/LN/Characters/PC/Human/MFighter/Textures/blue_Cube.blue_Cube'

But as

MFighter.blue_Cube << Like this.

And when I import my json as datatable and choose my UStruct from the dropdown I would like to convert

This MFighter.blue_Cube into this Texture2D'/LN/Characters/PC/Human/MFighter/Textures/blue_Cube.blue_Cube'

where MFighter is the name of an Object Library that contains all this textures inside

Does this make sense? Is that possible?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question