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
Explore 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
Learning C# by Developing Games with Unity 2019
Learning C# by Developing Games with Unity 2019

Learning C# by Developing Games with Unity 2019: Code in C# and build 3D games with Unity , Fourth Edition

eBook
₹799 ₹2621.99
Paperback
₹3276.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Learning C# by Developing Games with Unity 2019

Getting to Know your Environment

Pop culture has taught us that computer programmers are usually outsiders, lone wolves, or geeky hackers who possess extraordinary mental gifts for algorithmic thought, little social IQ, and the odd anarchic bent. While this is definitely not the case, in reality, there is something to the idea that learning to code fundamentally changes the way you look at the world. The good news is that your naturally curious mind will quickly adapt to this new way of thinking, and maybe even come to enjoy it.

You already use analytical skills in your everyday life that translate to programming—you're just missing the right language and syntax to map those life skills into code. You know your age, right? That's a variable. When you cross the street, I presume you look left, right, then left again like the rest of us. That's evaluating different conditions or what we call control...

Some basic prerequisites

Sometimes it's easier to start with what a thing isn't, rather than what it is. The main goal of this book isn't to learn the vast ins and outs of Unity or all of game development. By necessity, we'll cover these topics at a basic level, and in more detail in Chapter 6, Getting Your Hands Dirty with Unity, but their purpose is to provide a fun, accessible way for us to learn the C# programming language from the ground up.

Since this book is aimed at complete beginners to programming, if you have no previous experience with either C# or Unity, you're in the right place! If you've had some experience with the Unity editor but not with programming, guess what? This is still the place to be. Even if you've dabbled in a bit of C# mixed with Unity, but want to explore some more intermediate or advanced topics, the later chapters can provide you with what you're looking for.

If you're an experienced...

Starting out with Unity 2019

Head over to https://store.unity.com/ and you'll see a few options. Don't get overwhelmed—you can get Unity completely free by selecting the personal option on the right. The other paid options offer more advanced functionality and services, but you can check these out on your own down the road:

After selecting the personal plan, you'll end up on the download screen; accept the terms and conditions and hit Download Installer for Mac OS X:

If you're using a Windows machine, select the Choose Windows link located underneath the installer button, accept the terms and conditions, and you're good to go!

You can also download and manage different versions of Unity through the Unity Hub application, which can be also be downloaded from this screen.

When the download is complete, open up the package (by double-clicking it) and follow the...

Using C# with Unity

Going forward, it's important to think of Unity and C# as symbiotic entities. Unity is the engine where you will create scripts and eventually run them, but the actual programming will take place in another program, called Visual Studio. Don't sweat that right now—we'll get to that in a moment.

Working with C# scripts

Even though we haven't covered any basic programming concepts yet, we still need to know how to create a C# script in Unity.

There are several ways to create C# scripts in the editor:

  • From the menu bar, navigate to Assets | Create | C# Script
  • In the Project tab, select Create | C# Script
  • Right-clickin the Project tab (on the right-hand side) and select Create | C#Script from the popup menu
Going forward, whenever you're instructed to create a C# script, please use whichever method you prefer.
Resources and objects other than...

Documentation

The last topic we'll touch on in this first foray into Unity and C# scripts is documentation. Not sexy, I know, but it's important to form good habits early when dealing with new programming languages or development environments.

Accessing Unity's documentation

Once you start writing scripts in earnest, you'llprobablybe using Unity's documentation quite often, so it's beneficial to know how to access it early on. TheReference Manualwill give you an overview of a component or topic, while specific programming examples can be found in theScripting Reference.

Time for action – opening the Reference Manual

Every GameObject (item in the Hierarchy panel) in a Scene has a Transform component that controls its placement, Rotation, and Scale. To keep things simple, we'll just look up the camera's Transform component in the Reference Manual:

  1. In the Hierarchy tab, select...

Pop quiz – dealing with scripts

  1. What type of relationship do Unity and Visual Studio share?
  2. The Scripting Reference supplies example code in regards to using a particular Unity component or feature. Where could you find more detailed (non-code-related) information about Unity components?
  3. The Scripting Reference is a large document. How much of it do you have memorized before attempting to write a scripts?
  4. When is the best time to name a C# script?

Summary

We covered quite a bit of logistical information in this chapter, so I can understand if you're itching to write some code. Starting new projects, creating folders and scripts, and accessing documentation are topics that are easily forgotten in the excitement of a new adventure. Just remember that this chapter has a lot of resources you might need in the coming pages, so don't be afraid to come back and visit. Thinking like a programmer is a muscle: the more you work it, the stronger it gets.

In the next chapter, we'll start laying out the theory, vocabulary, and main concepts you'll need to prime your coding brain. Even though the material is conceptual, we'll still be writing our first lines of code in the LearningCurve script. Get ready!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Beginner's guide to getting started with software development concepts from a macro level
  • Leverage the power of the latest C# in solving the complex programming problems
  • Learn to script and customize your 3D games and implement animation techniques to make them engaging

Description

Learning to program in today’s technical landscape can be a daunting task, especially when faced with the sheer number of languages you have to choose from. Luckily, Learning C# with Unity 2019 removes the guesswork and starts you off on the path to becoming a confident, and competent, programmer using game development with Unity. You’ll start off small by learning the building blocks of programming, from variables, methods, and conditional statements to classes and object-oriented systems. After you have the basics under your belt you’ll explore the Unity interface, creating C# scripts, and translating your newfound knowledge into simple game mechanics. Throughout this journey, you’ll get hands-on experience with programming best practices and macro-level topics such as manager classes and flexible application architecture. By the end of the book, you’ll be familiar with intermediate C# topics like generics, delegates, and events, setting you up to take on projects of your own.

Who is this book for?

The book caters to developers and programmers who want to get started with C# programming in a fun and engaging manner. Anyone who wants to build games and script in C# language and Unity can take this book up. No prior programming or Unity experience is required.

What you will learn

  • Understand programming fundamentals with practice examples in C#
  • Explore the interface and features of Unity 2019
  • Learn C# programming syntax from scratch
  • Create a game design document and prototype level
  • Explore intermediate programming topics and best practices
  • Implement game mechanics, interactions, and UI elements with C#

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 30, 2019
Length: 342 pages
Edition : 4th
Language : English
ISBN-13 : 9781789536942
Vendor :
Unity Technologies
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 30, 2019
Length: 342 pages
Edition : 4th
Language : English
ISBN-13 : 9781789536942
Vendor :
Unity Technologies
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
₹4500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts
₹5000 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 13,108.97
Hands-On Network Programming with C# and .NET Core
₹3276.99
Learning C# by Developing Games with Unity 2019
₹3276.99
C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development
₹6554.99
Total 13,108.97 Stars icon
Banner background image

Table of Contents

19 Chapters
Section 1: Programming Foundations and C# Chevron down icon Chevron up icon
Getting to Know your Environment Chevron down icon Chevron up icon
The Building Blocks of Programming Chevron down icon Chevron up icon
Diving into Variables,Types, and Methods Chevron down icon Chevron up icon
Control Flow and Collection Types Chevron down icon Chevron up icon
Working with Classes, Structs, and OOP Chevron down icon Chevron up icon
Section 2: Scripting Game Mechanics in Unity Chevron down icon Chevron up icon
Getting Your Hands Dirty with Unity Chevron down icon Chevron up icon
Movement, Camera Controls, and Collisions Chevron down icon Chevron up icon
Scripting Game Mechanics Chevron down icon Chevron up icon
Basic AI and Enemy Behavior Chevron down icon Chevron up icon
Section 3: Leveling Up Your C# Code Chevron down icon Chevron up icon
Revisiting Types, Methods, and Classes Chevron down icon Chevron up icon
Exploring Generics, Delegates, and Beyond Chevron down icon Chevron up icon
The Journey Continues Chevron down icon Chevron up icon
Completed Game Files Chevron down icon Chevron up icon
Supplementary Classes Chevron down icon Chevron up icon
Pop Quiz Answers Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(23 Ratings)
5 star 56.5%
4 star 13%
3 star 8.7%
2 star 17.4%
1 star 4.3%
Filter icon Filter
Top Reviews

Filter reviews by




Pino d'Angio Jun 28, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a newcomer to Unity and C#, I soon realized I needed a guide to hold my hand through the learning curve, rather than trying to make sense of bits of information randomly picked on Unity and Microsoft .NET sites. This book did precisely that for me even although I sometimes struggled to keep up the pace, especially in chapter 5 Working with Classes, Structs, and OOP. But it all started to sink in after a couple reviews.I use this book in tandem with another book long on game development but short on explaining the logic behind its scripts, so they complement each other perfectly.On another note, I did not find any editing issues in the book, all the example scripts worked as intended without throwing any compiling errors. Another goodie, in the Chapter Next Steps, the author points to many useful references to current Unity and C# resources and forums.From my beginner perspective, money well spent.
Amazon Verified review Amazon
Kelsey Betzelberger Jan 06, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I started this book as a complete beginner to programming. I really just wanted a way to explore game development as a hobby without getting overwhelmed by the amount of information out there. This is exactly what I got and I can’t wait to start creating my own games and content! Highly recommend.
Amazon Verified review Amazon
Hunter Marquis Oct 31, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book quickly introduces C# syntax, as well as programmjng concepts and best practices in an easy to understand manner. All without getting bogged down in too many technicalities in which someone new to programming could easily get lost or discouraged. Practical example implementations are provided to really bring the presented information into context.I was excited to see the inclusion of various design patterns that are often times overlooked in game programming but are quite important.Although touching on alot of basics, even intermediate game programmers will come away with something new and valuable.A great book, I highly recommend!
Amazon Verified review Amazon
Billy Canterberry Oct 09, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Awesome book. Gets you adjusted slowly and logically at a pace that doesn't overwhelm you until everything becomes clear and next thing you know you're getting the hang of it with solid potential.
Amazon Verified review Amazon
Basel May 07, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A great introduction to basic C# syntax, especially for someone coming from another programming language (in my case, Swift). This was my first time using Visual Studio and Unity and the book made how to get through the process simple. The author kept topics to the point and always broke down code examples when necessary. The sample projects were simple but worked well for explaining concepts in a hands-on way. I was able to go through everything step by step and then had an immediate example project which fleshed out any areas that I was confused on still. As they say, the quickest way to learn is through doing and this book capitalizes on that concept. If I had one comlaint it would be for the lack of intermediate topics, although that's to be expected from an intro book. I also appreciated the author's personal flair and style added. Not many technical books and/or authors do that.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.