This commit is contained in:
DCFApixels 2025-03-29 15:55:26 +08:00
parent c36642ad83
commit 9e9f9a77b6
4 changed files with 20 additions and 11 deletions

View File

@ -150,9 +150,10 @@ namespace DCFApixels.DragonECS.Internal
catch (Exception e) catch (Exception e)
{ {
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS #if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw; throw e;
#endif #else
EcsDebug.PrintError(e); EcsDebug.PrintError(e);
#endif
} }
finally finally
{ {

View File

@ -211,9 +211,10 @@ namespace DCFApixels.DragonECS
catch (Exception e) catch (Exception e)
{ {
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS #if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw; throw e;
#endif #else
EcsDebug.PrintError(e); EcsDebug.PrintError(e);
#endif
} }
_markers[i].End(); _markers[i].End();
} }
@ -251,9 +252,10 @@ namespace DCFApixels.DragonECS
catch (Exception e) catch (Exception e)
{ {
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS #if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw; throw e;
#endif #else
EcsDebug.PrintError(e); EcsDebug.PrintError(e);
#endif
} }
_markers[i].End(); _markers[i].End();
} }
@ -378,9 +380,10 @@ namespace DCFApixels.DragonECS
catch (Exception e) catch (Exception e)
{ {
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS #if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw; throw e;
#endif #else
EcsDebug.PrintError(e); EcsDebug.PrintError(e);
#endif
} }
finally finally
{ {
@ -433,9 +436,10 @@ namespace DCFApixels.DragonECS
catch (Exception e) catch (Exception e)
{ {
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS #if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw; throw e;
#endif #else
EcsDebug.PrintError(e); EcsDebug.PrintError(e);
#endif
} }
finally finally
{ {

View File

@ -440,10 +440,12 @@ namespace DCFApixels.DragonECS
public ref readonly T Read(int entityID) { return ref _pool.Read(entityID); } public ref readonly T Read(int entityID) { return ref _pool.Read(entityID); }
object IEcsReadonlyPool.GetRaw(int entityID) { return _pool.Read(entityID); } object IEcsReadonlyPool.GetRaw(int entityID) { return _pool.Read(entityID); }
#if !DRAGONECS_DISABLE_POOLS_EVENTS
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void AddListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); } public void AddListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void RemoveListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); } public void RemoveListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); }
#endif
#endregion #endregion
#region Convertors #region Convertors

View File

@ -389,10 +389,12 @@ namespace DCFApixels.DragonECS
return default; return default;
} }
#if !DRAGONECS_DISABLE_POOLS_EVENTS
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void AddListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); } public void AddListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void RemoveListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); } public void RemoveListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); }
#endif
#endregion #endregion
#region Convertors #region Convertors