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

PhysicsSpace.SyncShapes

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 int SyncShapes();

Returns

int The number of proxies that were synced.

Description

Refresh every proxy from its shape, updating each proxy AABB and categories to match the live shape. This only applies to a space bound to a world. A proxy whose shape has been destroyed since it was added is skipped and reported with a single warning.


Declaration

public int SyncShapes(ReadOnlySpan<ProxyHandle> proxyHandles);

Parameters

Parameter Description
proxyHandles The proxies to sync.

Returns

int The number of proxies that were synced.

Description

Refresh the specified proxies from their shapes, updating each proxy AABB and categories to match the live shape. This only applies to a space bound to a world. An invalid proxy handle, or a proxy whose shape has been destroyed, is skipped and reported with a single warning.


Declaration

public int SyncShapes(ProxyHandle proxyHandle);

Parameters

Parameter Description
proxyHandle The proxy to sync.

Returns

int The number of proxies that were synced (0 or 1).

Description

Refresh a single proxy from its shape, updating the proxy AABB and categories to match the live shape. This only applies to a space bound to a world. The proxy is skipped if its handle is invalid or its shape has been destroyed.