mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
refactoring/update debug utility
This commit is contained in:
parent
33f1f03294
commit
5f047a4507
@ -129,6 +129,7 @@ namespace DCFApixels.DragonECS
|
||||
injectCallbacksRunner.OnPreInitInjectionAfter();
|
||||
EcsRunner.Destroy(injectCallbacksRunner);
|
||||
}
|
||||
_injectedData = default;
|
||||
}
|
||||
public void OnPreInitInjectionBefore() { }
|
||||
public void OnPreInitInjectionAfter() => _injectController = null;
|
||||
|
@ -54,5 +54,11 @@ namespace DCFApixels.DragonECS
|
||||
var atr = type.GetCustomAttribute<DebugColorAttribute>();
|
||||
return atr != null ? (atr.r, atr.g, atr.b) : ((byte)255, (byte)255, (byte)255);
|
||||
}
|
||||
|
||||
public static bool IsHidden<T>() => IsHidden(typeof(T));
|
||||
public static bool IsHidden(Type type)
|
||||
{
|
||||
return type.GetCustomAttribute<DebugHideAttribute>() != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user