Files
CartoonRPG/Assets/StixGames/GrassShader/Scripts/ReadjustBoundingBox.cs
Caleb Sandford deQuincey 02c4b5ab66 Adding in new packages
2025-06-05 22:59:18 +01:00

21 lines
442 B
C#

using UnityEngine;
namespace StixGames.GrassShader
{
[RequireComponent(typeof(MeshFilter))]
[AddComponentMenu("Stix Games/Deprecated/Readjust Bounding Box")]
public class ReadjustBoundingBox : MonoBehaviour
{
public float maxGrassHeight = 2;
void Start ()
{
var mesh = GetComponent<MeshFilter>().mesh;
var bounds = mesh.bounds;
bounds.Expand(maxGrassHeight * 2);
mesh.bounds = bounds;
Destroy(this);
}
}
}