Skip to content

Instantly share code, notes, and snippets.

View UXVirtual's full-sized avatar

Michael UXVirtual

View GitHub Profile
@UXVirtual
UXVirtual / TreeReplacerS.cs
Last active April 6, 2025 03:23 — forked from st4rdog/TreeReplacerS.cs
Replaces trees on a terrain with prefab.
using UnityEngine;
using UnityEditor;
// Replaces Unity terrain trees with prefab GameObjects.
// Handles terrain offsets correctly.
public class TreeReplacerS : EditorWindow
{
[Tooltip("The terrain containing the trees to replace.")]
public Terrain _terrain;