Version: 2022.2
언어: 한국어
복합 콜라이더 2D
Physics Material 2D

커스텀 콜라이더 2D

The Custom Collider 2D is a Collider that interacts with the 2D physics system. Unlike other Colliders, you do not configure the Collider in-Editor, instead you configure the Collider by assigning PhysicsShape2D geometry to it via the PhysicsShapeGroup2D API. You can further define the Collider by adding, removing and modifying the PhysicsShape2D shapes. Refer to the PhysicsShape2D API documentation for more information. This also means that a Custom Collider 2D can contain an unlimited number of low-level PhysicsShape2D and represent any type of shape, or emulate other types of Collider 2D.

Custom Collider 2D properties
Custom Collider 2D properties
프로퍼티 기능
Material Select the Physics Material 2D that determines properties of collisions, such as friction and bounce.
Is Trigger Enable this if you want this Collider 2D to behave as a trigger. The physics system ignores this Collider when this is enabled.
Used by Effector Enable this if you want the Collider 2D to be used by an attached Effector 2D.
Offset 콜라이더 2D 지오메트리의 로컬 오프셋 값을 설정합니다.
Custom Shape Count (Read only) 콜라이더에서 사용 중인 PhysicsShape2D의 수를 나타냅니다.
Custom Vertex Count (Read Only) 콜라이더에서 모든 PhysicsShape2D가 사용 중인 버텍스의 수를 나타냅니다.
Layer Overrides Expand for the Layer override settings.
Layer Override Priority Assign the decision priority that this Collider2D uses when resolving conflicting decisions on whether a contact between itself and another Collision2D should happen or not. Refer to its API page for more information.
Include Layers Select the additional Layers that this Collider 2D should include when deciding if a contact with another Collider2D should happen or not. Refer to its API documentation for more information.
Exclude Layers Select the additional Layers that this Collider 2D should exclude when deciding if a contact with another Collider2D should happen or not. Refer to its API documentation for more information.
Force Send Layers Select the Layers that this Collider 2D is allowed to send forces to during a Collision contact with another Collider2D. Refer to its API documentation for more information.
Force Receive Layers Select the Layers that this Collider 2D can receive forces from during a Collision contact with another Collider2D. Refer to its API documentation for more information.
Contract Capture Layers Select the Layers of other Collider 2D, involved in contacts with this Collider2D, that will be captured. Refer to its API documentation for more information.
Callback Layers Select the Layers that this Collider 2D, during a contact with another Collider2D, will report collision or trigger callbacks for. Refer to its API documentation for more information.

Using the Custom Collider 2D

커스텀 콜라이더 2D에 PhysicsShape2D를 할당할 때 편집 모드나 플레이 모드 중에도 할당할 수 있습니다. 편집 모드에서 커스텀 콜라이더 2D를 수정할 때 Unity는 할당된 모든 PhysicsShape2D와 관련 버텍스를 Unity 씬에 저장하고 CustomCollider2D는 씬이 로드될 때 설정을 유지합니다. 이렇게 하면 편집 모드 저작 스크립트를 사용하여 커스텀 지오메트리를 생성할 수 있습니다.

플레이 모드에서 커스텀 콜라이더 2D를 수정할 때 콜라이더는 할당된 PhysicsShape2D와 관련 버텍스에 대한 어떤 변경 사항도 유지하지 않으며 플레이 모드를 종료하면 모든 변경 사항이 손실됩니다.

CustomCollider2D

복합 콜라이더 2D
Physics Material 2D
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961