![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Multicast delegate registration class. A function can expose this base class to users to let them bind against, but without letting them broadcast. This gives us the benefit of C# events.
Example:
struct FInterestingThing { public: TMulticastDelegateRegistration<void()>& OnInterestingThing() const { return OnInterestingThingDelegate; }
private: mutable TMulticastDelegate<void()> OnInterestingThingDelegate; };
void Func(const FInterestingThing& Thing) { // Registration and reregistration are allowed FDelegateHandle Handle = Thing.OnInterestingThing().Add([](){ RespondToInterestingThing(); }); Thing.OnInterestingThing().Remove(Handle);
// Broadcast is not Thing.OnInterestingThing().Broadcast(); // error: Broadcast is deleted }