Learning C# by developing games with Unity 2019 code in C# and build 3D games with Unity
Unity, the world's leading real-time engine, is used to create half of the world's games. This book will teach programming newcomers the C# language in a fun and accessible way through game development. No prior programming or game development experience is required, only a curious mind
Main Author: | |
---|---|
Format: | eBook |
Language: | English |
Published: |
Birmingham, UK
Packt Publishing
2019
|
Edition: | Fourth edition |
Subjects: | |
Online Access: | |
Collection: | O'Reilly - Collection details see MPG.ReNa |
Table of Contents:
- Practical backslashesTime for action
- adding comments; Putting it together in Unity; Scripts become components; Variables and the Inspector panel; A helping hand from MonoBehavior; Hero's trial
- MonoBehavior in the Scripting API; Class and component communication; Enter dot notation; Pop quiz
- C# building blocks; Summary; Chapter 3: Diving into Variables, Types, and Methods; Writing proper C#; Simple debugging; Variable syntax ; Type and value declarations; Type-only declarations; Access modifiers; Choosing a security level; Time for action
- making a variable private; Working with types
- Time for action
- opening the Reference ManualTime for action
- using the Scripting Reference; Locating C# resources; Time for action
- looking up a C# class; Pop quiz
- dealing with scripts; Summary; Chapter 2: The Building Blocks of Programming; Defining variables; Names are important; Variables act as placeholders; Time for action
- creating a variable; Time for action
- changing a variable's value; A method to the madness; Methods drive actions; Methods are placeholders too; Time for action
- a simple method; Introducing classes; A class all along; Everyday blueprints; Commenting is key
- Time for action
- adding method parametersSpecifying return values; Time for action
- adding a return type; Using return values; Time for action
- capturing return values ; Hero's trial
- methods as arguments; Common Unity methods; The Start method; The Update method; Pop quiz #2
- Understanding methods; Summary; Chapter 4: Control Flow and Collection Types; Selection statements; The if-else statement; Basic Syntax; Time for action
- thieving prospects; Using the NOT operator; Nesting statements; Evaluating multiple conditions; Time for action
- reaching the treasure; The switch statement
- Common built-in typesTime for action
- playing with different types; Time for action
- creating interpolated strings; Type conversions; Inferred declarations; Custom types; Types roundup; Naming variables; Best practices; Variable scope; Introducing operators; Arithmetic and assignments; Time for action
- executing incorrect type operations; Pop quiz #1
- variables and types; Defining methods; Basic syntax; Modifiers and parameters; Time for action
- defining a simple method; Naming conventions; Methods are logic detours; Specifying parameters; Assigning arguments
- Includes bibliographical references
- Cover; Title Page; Copyright and Credits; Dedication; About Packt; Contributors; Table of Contents; Preface; Section 1: Programming Foundations and C#; Chapter 1: Getting to Know your Environment; Some basic prerequisites; Starting out with Unity 2019; Creating a new project; Navigating the editor; Using C# with Unity ; Working with C# scripts; Time for action
- creating a C# script; Introducing the Visual Studio editor; Time for action
- opening a C# file; Beware of naming mismatches; Syncing C# files; Fixing a broken sync; Documentation; Accessing Unity's documentation