UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TDelegateRegistration< DelegateSignature, UserPolicy > Class Template Reference

Detailed Description

template<typename DelegateSignature, typename UserPolicy = FDefaultDelegateUserPolicy>
class TDelegateRegistration< DelegateSignature, UserPolicy >

Delegate registration class. A function can expose this base class to users to let them bind against, but without letting them execute. This gives us the benefit of C# events.

Example:

struct FInterestingThing { public: TDelegateRegistration<void()>& OnInterestingThing() const { return OnInterestingThingDelegate; }

private: mutable TDelegate<void()> OnInterestingThingDelegate; };

void Func(const FInterestingThing& Thing) { // Binding and unbinding are allowed Thing.OnInterestingThing().BindLambda([](){ RespondToInterestingThing(); }); Thing.OnInterestingThing().Unbind();

// Execute is not Thing.OnInterestingThing().Execute(); // error: Execute is deleted }


The documentation for this class was generated from the following file: