Rather than having to create and place every GameObject on the screen by hand for every level of a game, a better approach can be to create the text files of rows and columns of characters, where each character corresponds to the type of GameObject that is to be created in the corresponding location.
In this recipe, we'll use a text file and a set of prefab sprites to display a graphical version of a text data file for a screen from the classic game NetHack:
Figure 13.9 – The level we've created from a text file level description