Share E-Book

Unity Game Development Programming C in Unity Engine , a guide book for beginners - 1nd edition - 2020 (Kathleen Peterson)(Z-Library)

Author Kathleen Peterson

code
Language English

If you don't know anything about programming in general, writing code, writing scripts, or have no idea where to even begin, then this book is perfect for you. If you want to make games and need to learn how to write C# scripts or code, then this book is ideal for you.Unity is a cross-platform development platform initially created for developing games but is now used for a wide range of things such as: architecture, art, children's apps, information management, education, entertainment, marketing, medical, military, physical installations, simulations, training, and many more.Unity takes a lot of the complexities of developing games and similar interactive experiences and looks after them behind the scenes so people can get on with designing and developing their games. These complexities include graphics rendering, world physics and compiling. More advanced users can interact and adapt them as needed but for beginners they need not worry about it.Games in Unity are developed in two halves; the first half -within the Unity editor, and the second half -using code, specifically C#. Unity is bundled with MonoDevelopor Visual Studio 2015 Communityfor writing C#.

Format EPUB
Size 964.0 KB
192
Views
0
Downloads
0.00
Total Donations

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
AI guide
【One-Line Pitch】 A beginner-friendly guide to Unity game development that teaches C# scripting from scratch, walking you through building a complete 2D game while mastering the Unity editor, prefabs, and core programming concepts. 【Book Arc】 - **Opening (~0%–9%)**: Introduces Unity as a cross-platform engine for games and beyond, explains the 2D vs 3D project choice (including "2.5D" orthographic and side-scrolling hybrids), and sets expectations for absolute beginners with no programming background. - **Early (~15%–24%)**: Explains why game engines exist (handling graphics, physics, input, AI as reusable modules) and walks through installing Unity, creating a project, importing free assets from sites like Kenney.nl, and setting up sprites for a 2D game. - **Early (~29%–32%)**: Covers scene hierarchy fundamentals—creating empty GameObjects, parenting objects (SceneRoot, Background), saving scenes, and the math behind tiling background images with pivot points and pixel-to-unit conversions. - **Middle (~38%–47%)**: Introduces prefabs as reusable templates, demonstrates creating a Sprite Renderer-based BGElement prefab, and dives into the first C# script (BackgroundManager) that instantiates background elements, sets positions, and adds colliders. - **Middle (~53%+)**: Explains how to wire script variables to Unity's Inspector (dragging prefabs, setting list sizes, repeat counts), and how the script manages background changes via BroadcastMessage and parent-child relationships. 【Key Takeaways】 - **Unity handles the hard parts** (Early): Graphics rendering, physics, and compilation are managed behind the scenes, letting beginners focus on game logic—the engine's modular design means you only write what makes your game unique. - **2D vs 3D mode is flexible** (Early): The choice affects default settings like texture vs sprite import, but you can switch anytime; use 3D mode for orthographic "2.5D" games and 2D mode for pure sprite-based games. - **Prefabs are reusable templates** (Middle): Create an object once with components (like Sprite Renderer), drag it into a Prefabs folder, and instantiate copies in code—changes to the template update all instances, saving massive time. - **Scene hierarchy is organizational** (Early): Empty GameObjects act as parents (SceneRoot, Background) to group children logically; parenting also affects transforms and makes scene management cleaner. - **Pixel-perfect math matters** (Early): Understanding pivot points and unit conversions (1 unit = 100 pixels) lets you calculate exact positions for tiling backgrounds seamlessly across the screen. - **C# scripts are components** (Middle): Scripts attach to GameObjects and expose public variables in the Inspector, letting you drag-and-drop assets (prefabs, sprites) without hardcoding references. - **BroadcastMessage enables decoupled logic** (Middle): Sending messages like "SceneBoundsChanged" lets scripts communicate without direct references, keeping code modular and easier to maintain. 【Reading Tips】 - **Skim the Unity installation and project creation** (Early): If you've used Unity before, skip ahead; the steps are standard and covered better in video tutorials. - **Deep-read the background tiling math** (Early ~32%): The pivot point and position calculations are foundational for 2D games—work through the numbers with a calculator to truly grasp it. - **Follow the BackgroundManager script line-by-line** (Middle ~44%–47%): This is your first real C# script; don't just read it—type it out and experiment with changing repeatCount or swapping sprites. - **Pay attention to the Inspector wiring** (Middle ~53%): Understanding how public variables appear in Unity's UI is crucial; practice dragging prefabs and setting list sizes to see the connection. - **Expect some rough edges**: The book mixes English and Arabic in places and references older Unity versions (2019), so focus on concepts over exact UI details. 【Coverage Limits】 Excerpts cover roughly the first half of the book (setup, scene building, and the first background script); later chapters on player movement, enemies, physics, and game mechanics are not included in this guide.

Passage locations

Excerpt 1
idea where to even begin, then this book is perfect for you. If you want to make games and need to learn how to write C# scripts or code, then this book is i...
View in text
Excerpt 2
meets the purpose for our project in this series of lessons.   Step two: create the project   Once the engine is running after installing it, the start scree...
View in text
Excerpt 3
er of the first set of photos as you see in the image below. What distinguishes these background images is that each of them applies its right side to the le...
View in text
Excerpt 4
  // Add a square shaped collision component             bg.AddComponent <BoxCollider2D> ();             // Add the image width to the horizontal location va...
View in text

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List