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"

How to associate custom object picker with class?

I have been trying to create a custom object (not class!) picker for a specific attribute. Instead of choosing from objects of a specific class, I want to be able to choose from a specific subset of those objects that fulfill specific criteria, which I have successfully written via the FARFilter class.

I have created the custom object picker via ContentBrowserSingleton function "CreateAssetPicker". Now, I want this custom object picker to apply to an otherwise normal UObject picker.

Imagine I have a UClass with a UProperty pointer towards a data asset. Normaly, the data asset object picker then shows you all available data assets (or with TSubclassOf only ones with specific classes). I want to overwrite this object picker with my own and haven't found a way to do so.

If it is possible I would like to avoid writing entire classes and detail customization classes for a single attribute. Surely there is a way to do this properly?

Product Version: UE 4.22
more ▼

asked May 13 '19 at 11:20 PM in C++ Programming

avatar image

79 6 11 17

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

1 answer: sort voted first

I not sure if this will be enough for you and what you look for in general, but there general course of action if you want to recreate something that editor does.

All UI you see in editor is Slate widgets and those widgets usually have code that manage stuff like picking something. So you use tool called Widget Reflector (Window->Development Tool->Widget Reflector). With it you can inspect all widgets that are currently displayed and see not only how they composed, but also from what class manage them (name of widget class should hint you which one is it). Then you can go to UE4 GitHub and search the class i editor code and see how they been made. Some of those Slate classes are made to be reusable so there is chance that all you need to do is just reuse that widget, at least you will be able to see how the code works and try to recreate that with you own.

But considering you want to list classes with specific conditions, something tells me you won't avoid loop search for specific UClasses.

more ▼

answered May 14 '19 at 03:13 AM

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