Skip to content

Instantly share code, notes, and snippets.

View SanielX's full-sized avatar

Alex SanielX

View GitHub Profile
@SanielX
SanielX / PrepareTerrainForNavmeshBake.cs
Created June 1, 2020 18:54
Small script I made to raplace all trees on terrain with something better for navmesh.
/*
I assumed all trees have capsule colliders so you'll need one on tree or in children.
Also tree prefab must be marked as Navmesh static
Undo is not implemented here, so use it carefully
*/
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace HostGame