Rasagar/Library/PackageCache/com.unity.rendering.light-transport/Runtime/UnifiedRayTracing/Common/Utilities/Utils.cs
2024-08-26 23:07:20 +03:00

23 lines
537 B
C#

namespace UnityEngine.Rendering.UnifiedRayTracing
{
internal static class Utils
{
public static void Destroy(UnityEngine.Object obj)
{
if (obj != null)
{
#if UNITY_EDITOR
if (Application.isPlaying && !UnityEditor.EditorApplication.isPaused)
UnityEngine.Object.Destroy(obj);
else
UnityEngine.Object.DestroyImmediate(obj);
#else
UnityEngine.Object.Destroy(obj);
#endif
}
}
}
}