mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
refactoring/update debug utility
This commit is contained in:
parent
33f1f03294
commit
5f047a4507
@ -129,6 +129,7 @@ namespace DCFApixels.DragonECS
|
|||||||
injectCallbacksRunner.OnPreInitInjectionAfter();
|
injectCallbacksRunner.OnPreInitInjectionAfter();
|
||||||
EcsRunner.Destroy(injectCallbacksRunner);
|
EcsRunner.Destroy(injectCallbacksRunner);
|
||||||
}
|
}
|
||||||
|
_injectedData = default;
|
||||||
}
|
}
|
||||||
public void OnPreInitInjectionBefore() { }
|
public void OnPreInitInjectionBefore() { }
|
||||||
public void OnPreInitInjectionAfter() => _injectController = null;
|
public void OnPreInitInjectionAfter() => _injectController = null;
|
||||||
|
@ -54,5 +54,11 @@ namespace DCFApixels.DragonECS
|
|||||||
var atr = type.GetCustomAttribute<DebugColorAttribute>();
|
var atr = type.GetCustomAttribute<DebugColorAttribute>();
|
||||||
return atr != null ? (atr.r, atr.g, atr.b) : ((byte)255, (byte)255, (byte)255);
|
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