Skip to content

Instantly share code, notes, and snippets.

View Figarist's full-sized avatar
🏠
Working from home

Figarist

🏠
Working from home
View GitHub Profile
@Figarist
Figarist / TreeGenerator.cs
Created October 17, 2022 19:04
Unity prefab tree generator based on terrain trees in scene
using System.Collections.Generic;
using UnityEngine;
public class TreeGenerator : MonoBehaviour
{
[SerializeField] private bool createOnStart;
[SerializeField] private List<GameObject> trees;
[SerializeField] private float minSize,maxSize;
private void Start()
{
if (!createOnStart) return;