Fixes optimization and UI/UX updates

This commit is contained in:
Savya Bikram Shah
2026-07-07 13:05:48 +05:45
parent dfd76d187f
commit e167af11fd
20 changed files with 429 additions and 489 deletions

View File

@@ -15,7 +15,23 @@ namespace Darkmatter.Libs.Observer
if (_map.TryGetValue(typeof(T), out var handlerObj))
{
var action = (Action<T>)handlerObj;
action?.Invoke(evt);
if (action == null) return;
// Invoke handlers one by one: a multicast invoke would let one throwing
// subscriber silently starve every later subscriber and rethrow into the
// publisher (paint / scene-transition code), turning a local bug into a
// stuck flow.
foreach (var handler in action.GetInvocationList())
{
try
{
((Action<T>)handler).Invoke(evt);
}
catch (Exception e)
{
UnityEngine.Debug.LogException(e);
}
}
}
}