Using of the RTS Kit events
Rts Starter Kit code contains a lot of events, which you can connect your code to. It simplifies development of new features very well. For example, you can do something when any unit spawned. You can receive info about spawn by connecting to Unit.UnitSpawned
using UnityEngine;
using InsaneSystems.RTSStarterKit;
class EventsExample : MonoBehaviour
{
void Start()
{
Unit.UnitSpawned += OnUnitSpawned; // connecting to the static UnitSpawned event. Now, every time when any unit spawned, attached method will be called.
}
void OnUnitSpawned(Unit unit)
{
Debug.Log($"Spawned a new unit {unit.name}!"); // this message will appear in console on unit spawn
// your actions here
}
}
Full list of events can be found in API Reference partition.