Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering Unity 2D game development
  • Toc
  • feedback
Mastering Unity 2D game development

Mastering Unity 2D game development

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

Mastering Unity 2D game development

3.8 (21)
By: 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
Free Chapter
1
1. Overview
14
Index

Understanding components


Components in Unity are the building blocks of any game; almost everything you will use or apply will end up as a component on a GameObject inspector in a scene.

Until you build your project, Unity doesn't know which components will be in the final game when your code actually runs (there is some magic applied in the editor). So, these components are not actually attached to your GameObject inspector but rather linked to them.

Accessing components using a shortcut

In most Unity examples, you are shown how to access components through scripts by using shortcuts to the MonoBehaviour class that the game object inherits from. Accessing the components with the help of the following code:

this.renderer.collider.attachedRigidbody.angularDrag = 0.2f;

Tip

If you need any help with this title or have any suggestions on it, join in on the support forum for the book at http://bit.ly/MasteringUnity2DForums. The forum will also keep you updated on any announcements on the title, so...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete