Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning C# by Developing Games with Unity 2019

You're reading from   Learning C# by Developing Games with Unity 2019 Code in C# and build 3D games with Unity

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789532050
Length 342 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Harrison Ferrone Harrison Ferrone
Author Profile Icon Harrison Ferrone
Harrison Ferrone
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: Programming Foundations and C# FREE CHAPTER
2. Getting to Know your Environment 3. The Building Blocks of Programming 4. Diving into Variables,Types, and Methods 5. Control Flow and Collection Types 6. Working with Classes, Structs, and OOP 7. Section 2: Scripting Game Mechanics in Unity
8. Getting Your Hands Dirty with Unity 9. Movement, Camera Controls, and Collisions 10. Scripting Game Mechanics 11. Basic AI and Enemy Behavior 12. Section 3: Leveling Up Your C# Code
13. Revisiting Types, Methods, and Classes 14. Exploring Generics, Delegates, and Beyond 15. The Journey Continues 16. Completed Game Files 17. Supplementary Classes 18. Pop Quiz Answers 19. Other Books You May Enjoy

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...
lock icon The rest of the chapter is locked
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 $19.99/month. Cancel anytime