Пример #1
0
 internal EntityQueryCache GetOrCreateEntityQueryCache()
 => m_EntityQueryCache ?? (m_EntityQueryCache = new EntityQueryCache());
Пример #2
0
 /// <summary>
 /// Initializes this system's internal cache of <see cref="EntityQuery"/> objects to the specified number of
 /// queries.
 /// </summary>
 /// <param name="cacheSize">The initial capacity of the system's <see cref="EntityQuery"/> array.</param>
 /// <remarks>A system's entity query cache expands automatically as you add additional queries. However,
 /// initializing the cache to the correct size when you initialize a system is more efficient and avoids
 /// unnecessary, garbage-collected memory allocations.</remarks>
 protected internal void InitEntityQueryCache(int cacheSize) =>
 m_EntityQueryCache = new EntityQueryCache(cacheSize);