public ref T Entity(uint entityID) { #if DEBUG && !PROFILE_SVELTO if (map.TryFindIndex(entityID, out var findIndex) == false) { throw new Exception("Entity not found in this group ".FastConcat(typeof(T).ToString())); } #else map.TryFindIndex(entityID, out var findIndex); #endif return(ref map.unsafeValues[(int)findIndex]);
public ref T Entity(uint entityID) { #if DEBUG && !PROFILE_SVELTO if (map.TryFindIndex(entityID, out var findIndex) == false) { throw new System.Exception("Entity not found in this group ".FastConcat(typeof(T).ToString())); } #else map.TryFindIndex(entityID, out var findIndex); #endif return(ref map.GetDirectValueByRef(findIndex)); }