Use a Custom Collider 2D
Use a Custom Collider 2D to create a collider with a unique shape and properties.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
When assigning to the Custom Collider 2D, you can do so either during Edit mode or Play mode. When modifying the Custom Collider 2D in Edit mode, Unity saves all assigned and associated vertices in the Unity Scene, and the retains its configuration when the Scene is loaded. This makes it possible to use Edit mode authoring scripts to create custom geometry.
PhysicsShape2DPhysicsShape2DCustomCollider2DWhen modifying the Custom Collider 2D during Play mode, the Collider will not retain any changes made to assigned and their associated vertices, and all changes will be lost when exiting Play mode.
PhysicsShape2D