Adding to the Game
Adding opponents to multiplayer and single-player games is the same.
To add opponents to your game, you first need to create an AI zone:
- 1.Put all environment objects in your scene into one parent object.
- 2.Mark walls, floor, and other necessary objects as static objects.
- 3.Add the AI Area component to the parent object
- 4.Set the baking parameters you need and bake the area.
- The Baked Agent Type indicates which AI types will be able to move around this arena.
- If you are using more than one area in your scene, set different Area Types for them. This will limit opponents within one zone.
After the area is ready you can add enemies to the scene. This can be done in 2 ways:
- If you need to spawn enemies on specific points, add them to the AI Area script.
- The second way is to place enemies on the scene in the places you need.
See the sections below to learn how to add waypoints, covers, and grass.