Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Unity 3D Game Development

You're reading from   Unity 3D Game Development Designed for passionate game developers—Engineered to build professional games

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801076142
Length 370 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Anthony Davis Anthony Davis
Author Profile Icon Anthony Davis
Anthony Davis
Travis Baptiste Travis Baptiste
Author Profile Icon Travis Baptiste
Travis Baptiste
Russell Craig Russell Craig
Author Profile Icon Russell Craig
Russell Craig
 Stunkel Stunkel
Author Profile Icon Stunkel
Stunkel
Arrow right icon
View More author details
Toc

Table of Contents (4) Chapters Close

1. Unity Game Development: Learn how to design beautiful games from the team at Unity
2. A Primer to the Third Dimension FREE CHAPTER 3. Design and Prototype 4. Programming

Fundamentals

With Visual Studio installed and connected it to Unity’s editor, we should go over the basics. In this section we will talk about data types, variables, logic or code flow, functions, classes, and MonoBehaviour. There is a lot of knowledge to be held in this section of this chapter, but it is meant to be referenced. If you have a sticky note, it might be a good idea to place it in these chapters to easily be referenced. When you open the file, there will be autopopulated C# that we will not need for this part. For now, delete the extra parts so that way it looks like this:

using UnityEngine;
 
public class ScriptingLesson : MonoBehaviour
{
// Data and Variables
// Logic and Flow
// Functions
}

The code here is doing two primary tasks. The first line imports the library of UnityEngine so that we can use classes from UnityEngine for our game. It also allows us to create the next portion which is a class named “ScriptingLesson” that inherits from MonoBehaviour...

lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images