BITFALL/Assets/GSpawn - Level Designer/Scripts/Core/Extensions/MeshEx.cs

14 lines
329 B
C#
Raw Normal View History

2024-01-27 04:09:57 +08:00
#if UNITY_EDITOR
using UnityEngine;
namespace GSpawn
{
public static class MeshEx
{
public static float calcInscribedWorldSphereRadius(this Mesh mesh, Transform meshTransform)
{
return mesh.bounds.extents.getMaxAbsComp() * meshTransform.lossyScale.getMaxAbsComp();
}
}
}
#endif