Search Unity

Search bar

Discussion in 'Scripting' started by soyjosemillan, Mar 20, 2018.

  1. soyjosemillan

    soyjosemillan

    Joined:
    Apr 4, 2016
    Posts:
    6
    Hi all, im trying to do a product list using json API and i'm very new with that, i dont use GameObjects because the items are called from the json API in the server so cant use search by GameObject name. Somebody have a tutorial or documentation about that o sobre una busqueda simple que yo pueda modificar para utilizar json? i googled but dont find something like that.
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    What are you trying to do? It's just not clear to me based on what you said.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Generally the fact you're using json wouldn't factor into your search feature. You'd import your data from json into whatever form you use within your game, and based on how you are storing it in memory you'd build your search feature to search that.

    For example if you import your data into a list of regular C# objects, you might use List.Find, or you might just loop through it with a foreach. Since there are any number of ways you could store your data in your game, there's plenty of ways to search it.