Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

PhysicsResultExtensions.Filter

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static PhysicsResultEnumerable<T,TFilter> Filter(NativeArray<T> source, TFilter filter);

Parameters

Parameter Description
source The result array to filter.
filter The filter deciding which elements are kept.

Returns

PhysicsResultEnumerable<T,TFilter> A filtered view that can be iterated with foreach.

Description

Produce a lazy, allocation-free view over a physics result array that yields only the elements the filter keeps.

The filter is a value type so the whole enumeration inlines and runs inside Burst.