- Home /
trying to make 2D water without dropping frame rate.
I've got this game I'm working on. And in it you can destroy the ground, and cause water to flow and spread to other areas. Similar to Minecraft's water, but it's in 2D. The problem I'm facing is even though I'm using things like object pooling, the frame still drops pretty quick once more water is created and spreads throughout the area. I'm wondering if there's something I can do to make sure the frame rate stays smooth with all the new water gameObjects. See the video below for a more visual example of my game and what I'm talking about, any help or suggestions would be much appreciated.
Answer by Remy_Unity · Dec 28, 2017 at 08:46 AM
Because your game is basicaly a 2D tile game, could you use a tilemap for you water ?
https://docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.html
This would allow you to only use one object for the water, and let Unity handle the drawing optimisation. You'll add water by using Tilemap.SetTile.
Your answer
Follow this Question
Related Questions
water changing color of player 2d 0 Answers
Low FPS because of changing sprites 2 Answers
Is the current basic water bugged? 0 Answers
Water Basic Has no texture 1 Answer
Boat in standard assets water 1 Answer