//Projects spawn-markers (Handles) with selected settings public static void ShowSpawnMarkers(SquadTrigger squadTrigger) { foreach (Squad squad in squadTrigger.Squads) { if (squad.UnitPositions != null) { for (int count = 0; count < squad.UnitPositions.Length; count++) { if (count == 0) { Handles.color = Color.red; //Spawn button marker at location of squad if (Handles.Button(squad.UnitPositions[count], Quaternion.identity, 0.25f, 0.25f, Handles.DotCap)) { //Make squad active GameObject in Hierarchy Selection.activeGameObject = squad.gameObject; } } else { Handles.color = Color.yellow; //Spawn simple marker at target Vector if (Handles.Button(squad.UnitPositions[count], Quaternion.identity, 0.25f, 0.25f, Handles.DotCap)) { UnitCursor cursor = squadTrigger.SquadManager.UnitCursor.GetComponent <UnitCursor>(); cursor.SetUnit(count, squad); Selection.activeGameObject = cursor.gameObject; } } } } } }