5

Recipes

Common Components

5.1Introduction

The utility scripts and commonly used systems in this chapter may come in handy for a range of different types of game projects. In the Assets/GPC_Framework/Scripts/COMMON folder you will find an eclectic bunch of reusable scripts like timers and camera controllers. In this chapter, we focus on those standalone scripts. You can easily take these and use them in any project, with or without using the GPC framework from this book.

Within the COMMON folder, there are several sub-folders. Those are;

AI

This contains scripts related to player or automatic control, such as a script to talk to the BaseAIController.cs script and act as a simple, functional bot moving around in a game environment.

Get C# Game Programming Cookbook for Unity 3D, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.