Get all assets of class?

Hello guys!

I have thousands of .PNG (Texture 2D) assets, and I want to have them in an array so I can check their object name and select the one I need.

The thing is I will be adding more later, and I have thousands now, and you know, manually creating an array and fitting all those is a hell of a nightmare.

Is there anyway I can get all my Texture assets?
Thanks in advance :smiley:

I would use a DataTable with a Texture2D variable. If each texture has a unique name you set that name as the row name in the DataTable.

When you want to access a texture and you know the name you can use the Get Data Table Row Action Node and send in the texturename in the Row Name.

For easy update you can create an Excel document with all your texture names and filepath and update your DataTable with a CSV-file exported from Excel.

Thanks for the answer Alltvin! But I found this:

It load the assets directly, without the need to declare them.

Cool! That is a C++ solution though.

Your question was in the Blueprint Scripting Section of AnswerHub so I thought you wanted an all Blueprint solution :slight_smile:

Cheers.

Yes, sorry for that, I needed to be executable from blueprints, but I didn’t really know that you could make custom blueprint nodes. UE4 is awesome :3