예제 #1
0
        public void Add(TKey key, TValue item)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .TryAdd(m_Buffer, key, item, true, m_AllocatorLabel);
        }
예제 #2
0
 unsafe public bool TryAdd(TKey key, TValue item)
 {
                 #if ENABLE_UNITY_COLLECTIONS_CHECKS
     AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
                 #endif
     return(NativeHashMapBase <TKey, TValue> .TryAdd((NativeHashMapData *)m_Buffer, key, item, false, m_AllocatorLabel));
 }