...
using System.Collections.Generic;
...
public static void StringToDictionary(Dictionary<int,int> d_,string str_)
{
int x1 = 0, x2 = 0;
string[] strArray = str_.Split(';');
Debug.Log("???? ???? strArray.Length:" + strArray.Length);
if (strArray.Length > 0)
{
for (int i=0; i < strArray.Length; i++)
{
Debug.Log("i:" + i + "///" + strArray[i]);//3000121,60
string[] strArray1 = strArray[i].Split(',');
if (strArray1.Length > 0)
{
for (int j = 0,k=1; j < strArray1.Length&& k < strArray1.Length; j += 2,k+=2)
{
Debug.Log("j:" + j + "///" + strArray1[j]+ " /k:" + k + "///" + strArray1[k]);//3000121//60
int.TryParse(strArray1[j],out x1);
int.TryParse(strArray1[k], out x2);
d_.Add(x1, x2);
}
}
}
}
}
...