2D Toolkit Forum

2D Toolkit => Support => Topic started by: raygozajc on June 21, 2013, 02:25:47 am

Title: Occlusion Culling
Post by: raygozajc on June 21, 2013, 02:25:47 am
Hi, in a 2d horizontally scrolling game using only sprites and animated sprites, do i have a benefit applying occlusion culling?, or only the default frustum culling?
Title: Re: Occlusion Culling
Post by: unikronsoftware on June 21, 2013, 11:03:49 am
It depends. You don't need to use the Unity occlusion culling system, that works best for 3d occlusion - in 2D, if you run into gameobject overheads (and you'll need a LOT of gameobjects for this to happen...) you can group some sprites together using the static sprite batcher, or group some sprites under a parent and disable that when it goes out of view manually - that could save you a bit of performance.

With animated sprites, you should disable the animator when its not in view, especially if you have a lot of them. Group them together as above, and disable a set at a time to avoid performance hitches.