Today we worked on our first Unity component, MapMaker, and attached it to a GameObject in the scene.
We added a TextAsset property to the class definition and saw how it became visible in the Unity Inspector. We were then able to associate our map file with this slot.

In the code, we created a new method (aka function) to our class definition called BuildMap() and added some code to it. Ultimately it was able to:
- Make sure that we had a map file specified before proceeding
- Show us name of the map file and its content
- Break the map file into individual lines
- Tell us how many lines were in the file
Then we created a pair of prefabs and a pair of matching materials. Prefabs are an essential Unity concept that represent pre-built combinations of GameObjects and associated components that we can quickly create copies of at runtime.

We are going to use these two prefabs to physically create our map from.
I have started a new GitHub repository to store our Unity project code. It can be found here. If you don’t have the latest version of our code before any session, use the green Code button on that page to get the “Download ZIP” option which will give you a full copy of all code we’ll be writing this year.



