using UnityEngine; [CreateAssetMenu(fileName = "StringList", menuName = "ScriptableObject/Util/StringList")] public class StringList : ScriptableObject { [SerializeField] string[] strings; public string[] Strings => strings; public string this[int index] => strings[index]; public int Length => strings.Length; public string GetRandomString() { return strings[Random.Range(0, strings.Length)]; } public bool TryGetString(int index, out string result) { result = null; if(index >= 0 && index < strings.Length) result = strings[index]; return result != null; } }