SetBatchProxyAABB(ReadOnlySpan<ProxyHandle>, ReadOnlySpan<PhysicsAABB>, bool)
Set a batch of proxy AABB, where the AABB at each index is set on the corresponding proxy at the same index. The two spans must be the same length. Any invalid proxy handle or AABB in the batch is skipped and reported with a single warning.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public int SetBatchProxyAABB(ReadOnlySpan<PhysicsSpace.ProxyHandle> proxyHandles, ReadOnlySpan<PhysicsAABB> aabbs, bool updateAncestors)
Parameters
The proxies to set.
The AABB to set on each corresponding proxy.
If the AABB have simply moved then this should be false however if you have changed their size then you should update the space ancestors which takes more time. This applies to the whole batch.
Returns
Type | Description |
|---|---|
| int | The number of proxies that were ignored (not set because the proxy handle or AABB was invalid). If the space is invalid or the spans are different lengths, nothing is set and every proxy is counted as ignored. |