Managers
📄️ General
In this asset, managers are scripts which handle a core functionality of the game, providing access to its functions via static methods (so they can be called from any other script) or by getting direct access via their GetInstance() methods.
📄️ Network Manager
Component
📄️ Game Manager
The GameManager component is the central managing script for the actual game logic in a match. It should exist in each map scene.
📄️ Grid Manager
The GridManager scripts maintains a list of all GridPlacement components placed in the map scene. GridPlacement is the parent script of a grid set, which instantiates tiles in a vertical and horizontal layout.
📄️ Tower Manager
The TowerManager component is a NetworkBehaviour responsible for everything tower-related that should also be synchronized across all connected clients.
📄️ Defense Point Manager
This manager object holds a list of all DefensePoint script that exist in the map. A defense point is the point where enemy units finish their path and apply damage to the players.
📄️ Path Manager
Component
📄️ Wave Manager
In this manager object you can specify the waves of units for each map. For that, the WaveManager has a list of entries to define in the inspector:
📄️ UI Manager
The only purpose this component has is loading the Map_UI scene additively in each map.
📄️ Pool Manager
Pooling objects means reusing game objects instead of instantiating and destroying them every time when they are needed. As Unity's garbage collector is very performance-heavy and could result in serious hiccups and dropping frames during the game, this asset implements strict pooling (activation/deactivation) for game objects needed multiple times in one scene. Thus instantiate and destroy should be replaced by PoolManager.Spawn() and PoolManager.Despawn(). Setting up object pooling in your scene is very easy:
📄️ Audio Manager
The AudioManager script is attached to an indestructible gameobject in the Intro scene living throughout scene changes, handling long (background music) and short (one-time effects) audio playback across the scenes.
📄️ Don't Destroy Manager
The Don't Destroy Manager script is attached to the Managers gameobject in the Intro scene to make all of its child objects live throughout scene changes. This is used for manager child objects that are only required once and do not change depending on the map loaded, like the AudioManager, UnityIAPManager or UnityAdsManager.