From dd8b126c27de2bbcb407717263541e928c813c92 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Sun, 23 Mar 2025 21:12:58 +0800 Subject: [PATCH] add deep debug for GetMeta --- src/DebugUtils/EcsDebugUtility.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DebugUtils/EcsDebugUtility.cs b/src/DebugUtils/EcsDebugUtility.cs index 9d9e3ed..f7303dd 100644 --- a/src/DebugUtils/EcsDebugUtility.cs +++ b/src/DebugUtils/EcsDebugUtility.cs @@ -1,6 +1,7 @@ #if DISABLE_DEBUG #undef DEBUG #endif +using DCFApixels.DragonECS.Internal; using System; using System.Collections.Generic; #if DEBUG || !REFLECTION_DISABLED @@ -312,6 +313,9 @@ namespace DCFApixels.DragonECS { public static TypeMeta GetMeta(this object self) { +#if DEBUG && DRAGONECS_DEEP_DEBUG + if (self is Type type) { Throw.DeepDebugException(); } +#endif return EcsDebugUtility.GetTypeMeta(self); } public static TypeMeta ToMeta(this Type self)