79632545

Date: 2025-05-21 18:10:50
Score: 1.5
Natty:
Report link

Native .NET Delegates are immutable; once created, the invocation list of a delegate does not change.

This means that everytime you add or remove a subscriber the invocation list gets rebuilt causing gc pressure.

Since unity events use an actual list they do not.

For multicast delegates that are frequently subscribed/unsubscribed to it might be worth considering using a UnityEvent instead.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: ZackOfAllTrades