CWX-mods/Live/CWX_GrassCutter/GrassCutterScript.cs
2023-08-03 10:01:46 +01:00

25 lines
589 B
C#

using GPUInstancer;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace CWX_GrassCutter
{
public class GrassCutterScript
{
public void Start()
{
List<GPUInstancerDetailManager> allGrass = GameObject.FindObjectsOfType<GPUInstancerDetailManager>().ToList();
GameObject streetsGrass = GameObject.Find("GrassPrefabManager");
foreach (var grass in allGrass)
{
grass.enabled = false;
}
streetsGrass?.gameObject.SetActive(false);
}
}
}