Book Image

Mastering Unity 2D game development

By : Simon Jackson
Book Image

Mastering Unity 2D game development

By: Simon Jackson

Overview of this book

Table of Contents (21 chapters)
Mastering Unity 2D Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Overview
Index

Putting it together


Moving on from theory, we need to look at something to put on our map of the world, such as somewhere for our player to travel to and explore.

We not only need to provide graphical support in the game to open up areas on the map or just show the journey between two points, but we also need to connect these points with scenes in our game.

Now, we have already started the coding framework behind our places manager with the creation of the NavigationManager script, which keeps track of all the places available in the world for our player to travel to. Just add a few more routes for the manager to look after and that's up and running.

Then, there is the visual side. As we want a common way to create places/markers on the map, we can start to use prefabs in Unity so that we only have to design them once and then just reuse them on our map.

Adding the map

Start off by copying your world texture into your project Assets folder in Assets\Sprites\Environment, and use any image you...