Beispiel #1
0
        public T GetById <T>(SerializableDataTable <T> table, string id) where T : IData
        {
            T value = (T)table.GetValue(id);

            if (value == null)
            {
                Debug.LogWarning("Cannot find id '" + id + "' in table " + table.GetType().Name);
                return(default(T));
            }
            return(value);
        }