Exemplo n.º 1
0
        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]);
Exemplo n.º 2
0
        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));
        }