Light2D slowing down the game in low end devices.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wbgyor

I am using three Light2d nodes in one scene. It works fine in the editor and when imported to a phone with 6gb of ram. When tried on a phone with 2gb of ram the frame rate has drastically gone down. I have tried by disabling the Light2D nodes and then it worked smoothly on both devices. Is that a problem with Light2D nodes? How can this be optimized for better performance?

:bust_in_silhouette: Reply From: Calinou

There isn’t much you can do about speeding up Light2D on slow devices. You could replace Light2D with sprites that use an additive blend mode, but these can’t cast shadows and will look different from actual lights.

Just make sure to use the GLES2 renderer so you can benefit from 2D batching and light scissoring optimizations.