2025-04-08 16:57:01 +02:00

18 lines
320 B
C#

using UnityEngine;
namespace Nobi.UiRoundedCorners {
internal static class DestroyHelper {
internal static void Destroy(Object @object) {
#if UNITY_EDITOR
if (Application.isPlaying) {
Object.Destroy(@object);
} else {
Object.DestroyImmediate(@object);
}
#else
Object.Destroy(@object);
#endif
}
}
}