【C#】 Dictionary 使用例

qiita.com

example 1

{
	public class TestClass : MonoBehaviour 
	{
		Dictionary<int, string> dic = new Dictionary<int, string>()
		{
			{ 0, "today's weather is nice!" },
			{ 1, "today's weather is so so!" },
			{ 2, "today's weather is really nice!" },
		};

		void Start()
		{
			foreach(int key in dic.Keys)
			{
				Debug.Log (dic[key]);
			}
		}
	}
}