diff --git a/src/Builtin/BaseProcesses.cs b/src/Builtin/BaseProcesses.cs index 42fdbbd..52344b5 100644 --- a/src/Builtin/BaseProcesses.cs +++ b/src/Builtin/BaseProcesses.cs @@ -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 { diff --git a/src/EcsRunner.cs b/src/EcsRunner.cs index 3398c43..227a53a 100644 --- a/src/EcsRunner.cs +++ b/src/EcsRunner.cs @@ -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 { diff --git a/src/Pools/EcsPool.cs b/src/Pools/EcsPool.cs index 8b3a7f1..655e44a 100644 --- a/src/Pools/EcsPool.cs +++ b/src/Pools/EcsPool.cs @@ -440,11 +440,13 @@ 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); } - #endregion +#endif +#endregion #region Convertors public static implicit operator ReadonlyEcsPool(EcsPool a) { return new ReadonlyEcsPool(a); } diff --git a/src/Pools/EcsTagPool.cs b/src/Pools/EcsTagPool.cs index 81c33a4..1bec619 100644 --- a/src/Pools/EcsTagPool.cs +++ b/src/Pools/EcsTagPool.cs @@ -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