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"

Filling an array with actors from Content Browser

I can currently fill a TArray with items that are already inside the editor but cant reference those from inside the content browser, I've been searching around a bit but couldn't find or figure out how to make it work I saw TAssetSubclassOf "Points to a subclass of the defined baseclass that hasn't been loaded yet, but can be by request. Used to point to Blueprints instead of basic components" which sounds like what I want since I turned the c++ items into blueprints (inherited from the main class) but I'm pretty lost for something that seems so simple, trying to fill a TArray with the items chosen from the content browser so I can randomly choose one and spawn it. sorry for the newbie question I'm pretty new to unreal but trying my best to learn :P

Thank you for taking time out of your day to help me out I really appreciate it <3

Product Version: UE 4.19
more ▼

asked Jul 02 '18 at 10:22 PM in C++ Programming

avatar image

1 1

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

1 answer: sort voted first

Make a TArray of TAssetSubclassOf then. You can use template type (you know once with <>) inside template type, so don't be scared of trying it.

Asside of those Asset pointers and weak object pointers, remeber that Content Browser is just Asset Registry viewer which APIs you can find here to directly interact with assets:

https://docs.unrealengine.com/en-us/Programming/Assets/Registry https://api.unrealengine.com/INT/API/Runtime/AssetRegistry/FAssetRegistryModule/index.html https://api.unrealengine.com/INT/API/Runtime/AssetRegistry/IAssetRegistry/index.html

more ▼

answered Jul 02 '18 at 11:18 PM

avatar image

36.7k 932 169 1111

(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