- Home /
Question by
joelfernandes23 · Apr 07, 2020 at 04:32 PM ·
c#beginnerscriptableobjectc# tutorial
Filter data in scriptable objects
Hi,
I have imported data from a csv file into a scriptable object. The scriptable object is made up like this.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Names", menuName = "Project/Names", order = 0)]
public class names : ScriptableObject{
[System.Serializable]
public class name
{
public string Name;
public string Gender;
public string Country;
public string GetName() {
return Name;
}
public string GetGender() {
return Gender;
}
public string GetCountry() {
return Country;
}
}
public name[] all_names;
}
I want to filter out data. For example, if I filter out the country as United States. I want it to show me the names and genders only from United States.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612230749im_/https://answers.unity.com/themes/thub/images/avi.jpg)