One Script to rule them all

We're going to create a single script to do most of the heavy lifting in our Tic Tac Toe game. Let's set it up.

  1. Create an empty GameObject, and rename it GameLogic.
  2. Create a new JavaScript and rename it GameLogic.
  3. Drag the GameLogic script onto the GameLogic GameObject to add it as a Component.

The GameLogic script will be the central control for the game.

Get Unity 4.x Game Development by Example Beginner's Guide 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.