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)
{
#if DRAGONECS_DISABLE_CATH_EXCEPTIONS
throw;
#endif
throw e;
#else
EcsDebug.PrintError(e);
#endif
}
finally
{

View File

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

View File

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

View File

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