Ejemplo n.º 1
0
        public void OnSceneGUI()
        {
            Grid grid = BrushUtility.GetRootGrid();

            SpawnPoint[] spawnPoints = BrushUtility
                                       .GetLayer(brush.Layer)
                                       ?.GetComponentsInChildren <SpawnPoint>();

            if (spawnPoints == null)
            {
                return;
            }

            BrushEditorUtility.BeginQuads(brush.Color);
            for (int i = 0; i < spawnPoints.Length; ++i)
            {
                SelectSpawnPoint(grid, spawnPoints[i]);
            }
            BrushEditorUtility.EndQuads();
        }
Ejemplo n.º 2
0
 private static void SelectSpawnPoint(Grid grid, SpawnPoint spawnPoint)
 {
     BrushEditorUtility.DrawQuadBatched(grid, grid.WorldToCell(spawnPoint.transform.position));
 }