Exemplo n.º 1
0
        /// <summary>
        /// Calculates the number of entities selected by this EntityQuery, ignoring any set filters.
        /// </summary>
        /// <remarks>
        /// The EntityQuery must run the queryDesc to calculate the entity count.
        /// </remarks>
        /// <returns>The number of entities based on the current EntityQuery properties.</returns>
        public int CalculateEntityCountWithoutFiltering()
        {
            SyncFilterTypes();
            var dummyFilter = default(EntityQueryFilter);

            return(ComponentChunkIterator.CalculateEntityCount(m_QueryData->MatchingArchetypes, ref dummyFilter));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Calculates the number of entities selected by this EntityQuery.
 /// </summary>
 /// <remarks>
 /// The EntityQuery must run the queryDesc and apply any filters to calculate the entity count.
 /// </remarks>
 /// <returns>The number of entities based on the current EntityQuery properties.</returns>
 public int CalculateEntityCount()
 {
     SyncFilterTypes();
     return(ComponentChunkIterator.CalculateEntityCount(m_QueryData->MatchingArchetypes, ref m_Filter));
 }