Infinite 2d terrain generation methods

I found two methods of creating infinite 2d levels.

  1. Dynamic 2D Terrain Generation in Unity
  2. Dynamic Level Generation

Which among these is a better method to create infinite 2d levels?

Both are good options. The first gives you a little more control since you are using prefabs, at the cost of some more initial work. I liked the second approach so much I actually created an asset in the Unity Asset Store that can do this for you. It is now released, so you could take a look at this to save yourself some time! Endless - 2D Terrain Generator

A good tool for Unity is 2D Level Creator