How inaccurate is QueryResult's underestimatedCount?

39 Views Asked by At

I am trying to write a System that removes entities from a scene when there are more than X of them. Can I rely on this underestimatedCount that I assume is faster or is casting to Array to get an accurate count fine?

    let entities = context.scene.performQuery(Self.query)
    let underestimatedCount = entities.underestimatedCount
    let accurateCount = Array(entities).count
0

There are 0 best solutions below