Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

Do UnityEvents automatically remove all listeners when an object is destroyed?

$
0
0
I'm used to remove all event listeners from C# events in OnDestroy, but I'm asking myself if this is still needed when using UnityEvents (added by code) – is it? Otherwise what's the best practice? To call RemoveAllListeners() in OnDestroy, I guess?

Viewing all articles
Browse latest Browse all 23263

Latest Images

Trending Articles



Latest Images