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?
asked May 13 '19 at 11:20 PM in C++ Programming
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here