Wednesday, May 15, 2024
HomeGame Developmentunity - Can I extract/bake the collisions generated by a tilemap collider?

unity – Can I extract/bake the collisions generated by a tilemap collider?


Given a tilemap, with a tilemap collider, is it possible to extract/bake the current collision(s) onto a separate gameobject independent from the tilemap/tilemap collider?

My 2D game streams a large tiled world, and the only data I can’t afford to offload is collisions due to pathfinding. I would like to have a loading screen where I load each tilemap sector, extract the collisions, and offload the sector – so at the beginning my world is just bunch of collision data with no actual tilemaps.

I don’t want to keep collision-only tilemaps loaded because I think they still allocate the full array for all tiles when most likely the world will be sparse.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments