How do i create search bar?

I wanted to create search bar that find the content from text array.

It should search all the elements from the array which work as Like Operator in SQL.
(SQL LIKE Operator)

Suppose my text array contains item as follows.

[0] Epic Games
[1] UE4 Game Engine
[2] Unity Game engine
[3] Maya

[n] 3Ds Max

And if I search for say ‘Eng’ then it should return me [1] Game Engine and [2] Unity Game engine.

I don’t want case sensitivity in search bar.

1 Like

use a “for loop”
read the result from the array into “to lower” to convert the characters to lower case.
use “find substring” to find your search text within the content returned by “to lower”
do your logic, this will repeat for each item in the array, if you want a list of results, you will need to feed successful results into another array to be used for display or whatever you are doing with it.

do not run this every tick unless you want split second changes listed, this will slow things down if done many times, or when the array expands.

1 Like

This channel covered a video on how to achieve this. It’s pretty good, I’d subscribe to him, he’s actually pretty good.

1 Like