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: https://discord.gg/hU5Kq2u


Sam Wronski
WRITTEN BY
Sam Wronski
Maker of things, currently helping build cloud things @ Google. World of Zero is a personal project disconnected from my professional work. Lets make something awesome together!