Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Unity 2D game development
  • Table Of Contents Toc
Mastering Unity 2D game development

Mastering Unity 2D game development

By : Simon Jackson
3.8 (21)
close
close
Mastering Unity 2D game development

Mastering Unity 2D game development

3.8 (21)
By: Simon Jackson

Overview of this book

If you have C# knowledge but now want to become truly confident in creating fully functional 2D RPG games with Unity, then this book will show you everything you need to know.
Table of Contents (15 chapters)
close
close
Lock Free Chapter
1
1. Overview
14
Index

Building the scene


So, now that we have some nice assets to build with, we can start building our first town.

Adding the town background

Returning to the scene view, you should see the following:

If, however, we add our town background texture (Assets\Sprites\Backgrounds\Background.png) to the scene by dragging it to either the project hierarchy or the scene view, you will end up with the following:

Note

Be sure to set the background texture position appropriately once you add it to the scene; in this case, be sure the position of the transform is centered in the view at X = 0, Y = 0, Z = 0.

Unity does have a tendency to set the position relative to where your 3D view is at the time of adding it—almost never where you want it.

Our player has vanished!

The reason for this is simple: Unity's sprite system has an ordering system that comes in two parts.

Sprite sorting layers

Sorting Layers (Edit | Project Settings | Tags and Layers) are a collection of sprites, which are bulked together to form a single...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Unity 2D game development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon