How to create a Search Bar
Hey Im trying to create a search bar (within game) which can search up different blueprints or objects based on their name. I'd really appreciate any help. Thanks!
asked Jun 04 '17 at 11:40 AM in Blueprint Scripting
Here's how I would approach this:
A) If the objects you want to filter/find are children of the same class then just create an array of those objects at a convenient location (game instance for example).
B) if objects don't share a parent you can make them implement an interface that returns the property you are searching by (e.g. name). Of course you will put them into an array as well, but this time the array type should be of the interface
Subsequently on whatever event you are using (chosen in #3) you should iterate (forloop) over the array and check if your objects qualify for the search string. (E.g their name contains the text you entered in textbar)
Put the matching objects into a separate array and output them under the searchbar.
This is the theoretic part, unfortunately it is not possible to code or blueprint graph for this unless we know specifically what you are trying to do
Follow this question
Once you sign in you will be able to subscribe for any updates here