ドキュメント

Unity Engine

Unity Engine

SetOwner(Object)

Set the (optional) owner object associated with this chain and return an owner key that must be specified when destroying the shape with PhysicsChain.Destroy. The physics system provides access to all objects, including the ability to destroy them so this feature can be used to stop accidental destruction of objects that are owned by other objects. You can only set the owner once, multiple attempts will produce a warning. It is also valid to not specify an owner object (NULL) to simply gain an owner key however it can be useful, if simply for debugging purposes and discovery, to know which object is the owner.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public int SetOwner(Object owner)

Parameters

owner

The object that owns this chain. This can be NULL if not required.

Returns

Type

Description

intAn owner key that must be passed to PhysicsChain.Destroy when destroying the chain.