This page looks best with JavaScript enabled

Loading Levels From Textures in Unity 3D

 ·   ·  ☕ 1 min read

Lets explore using a Texture2D as a way to represent tilemapped 2D levels. This gives us a way to easily draw levels in paint, photoshop or other image editing software and import it easily into Unity. The advantage of this is that you don’t need access to the Unity editor anymore to load levels. This exposes some basic modding/custom map support by allowing you to load new levels from the file system.

We’ll take a look at how to parse the data from a Texture2D, how we can do some basic lookups based on that data and how to turn that data into a generated tilemap.

Join the World of Zero Discord Server:

Sam Wronski
Sam Wronski
Maker of things and professional software engineer. Lets make something awesome together!