Navigation
Unreal Engine C++ API Reference > Runtime > Core > Misc > TAttribute > Bind
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Misc/Attribute.h |
Include | #include "Misc/Attribute.h" |
template<class SourceType>
void Bind
&40;
TSharedRef< SourceType > InUserObject,
typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr
&41;
Remarks
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
Parameters
Name | Description |
---|---|
InUserObject | Shared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |