When assigning PhysicsShape2D
to the Custom ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary 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 PhysicsShape2D
and associated vertices in the Unity SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, and the CustomCollider2D
retains its configuration when the Scene is loaded. This makes it possible to use Edit mode authoring scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary to create custom geometry.
When modifying the Custom Collider 2D during Play mode, the Collider will not retain any changes made to assigned PhysicsShape2D
and their associated vertices, and all changes will be lost when exiting Play mode.