GridVids
Sign in with YouTube

How to Update a 2D Collider at Runtime in Unity

Sunny Valley Studio Oct 7, 2025 13:59
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

Ever needed to update your 2D collider when changing a sprite at runtime? 💡 In this Unity Tip, you’ll learn how to use PolygonCollider2D.CreateFromSprite() to dynamically regenerate your collider so it always matches your sprite’s shape. Perfect for destructible terrain, character transformations, or any runtime sprite updates! ⚙️ 📘 Docs: https://docs.unity3d.com/6000.2/Documentation/ScriptReference/PolygonCollider2D.CreateFromSprite.html #unitytips #unity3d #gamedev
Entertainment
#unity create collider from sprite #unity sprite collider runtime