UnityProgramming1 public T GetData(string a_strKey) public T GetData(string a_strKey) { string _strValue; data.TryGetValue(a_strKey, out _strValue); object _value = null; if (typeof(T) == typeof(int)) { _value = int.Parse(_strValue); } if (typeof(T) == typeof(float)) { _value = float.Parse(_strValue); } if (typeof(T) == typeof(string)) { _value = _strValue; } return (T)_value; } 2022. 2. 22. 이전 1 다음