How to Create 2D Waves in Unity With a Plugin

Are you looking for a way to add moving liquids like water or lava in your Unity 2D game? Well, I just created the perfect plugin for you then!

Here are some examples of the things you can create with the "2D wave generator" plugin. Each of these waves was created in less than 10 seconds.

In this short article we will see how this plugin works. Spoiler: it's ridiculously simple.

Set Up

Let's start to see how to get the plugin in your Unity project.

The important thing here is the wave prefab at the bottom.

Add the Wave

Simply drag and drop the wave prefab to your scene, then position and scale it however you want. The idea is to set it exactly where you want the waves to appear. You can also change its color and material if you need to.

Then press play to see the default waves.

That was easy!

Tweak the Wave

The last step is to tweak the parameters of the waves to fit your needs. You can see them in the inspector when you click on the wave prefab.

You can change them while in play mode to see the result in real time.

How it Works

For your information, the wave is created programmatically with a mesh. Then all the points at the top of the mesh move up and down to follow a sine curve.

Here's a low resolution wave to better show you how this works.

Conclusion

As you can see the plugin is super easy to use. If you want it, you can download it here. And if you try the plugin, please make sure to leave a review. Thanks!

Get my free ebook "How To Create and Promote Your Own Games"
and be notified when I write new tutorials

More than 12,000 people already joined. No spam and unsubscribe at any time.

Wait! Get my free ebook :-)

Want to get my free ebook
"How To Create and Promote Your Own Games"
and be notified when I write new gamedev tutorials?

Then join the newsletter below.

More than 12,000 people already joined.
No spam and unsubscribe at any time.