This commit is contained in:
2025-09-17 18:56:28 +08:00
commit 54c72710a5
5244 changed files with 5717609 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using System;
using UnityEngine;
namespace DestroyIt
{
public static class Check
{
public static bool IsDefaultParticleAssigned()
{
if (DestructionManager.Instance == null) return false;
if (DestructionManager.Instance.defaultParticle == null)
{
Debug.LogError("DestructionManager: Default Particle is not assigned. You should assign a default particle effect for simple destructible objects.");
return false;
}
return true;
}
public static bool LayerExists(string layerName, bool logMessage)
{
if (DestructionManager.Instance == null) return false;
int layer = LayerMask.NameToLayer(layerName);
if (layer == -1)
{
if (logMessage)
Debug.LogWarning(String.Format("[DestroyIt Core] Layer \"{0}\" does not exist. Please add a layer named \"{0}\" to your project.", layerName));
return false;
}
return true;
}
}
}