![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Inherit from this empty interface to signal that the inheriting class knows that it's a component and that it can receive info about the composable class it is being registered to. More...
#include <Composition.h>
Inherit from this empty interface to signal that the inheriting class knows that it's a component and that it can receive info about the composable class it is being registered to.
Define the following functions in the inheriting class, where T is the expected type of the composable parent.
OnCreatedAt(T& parent) (required)OnCopiedAt(T& parent, <Self> const& from) (optional)OnMovedAt(T& parent) (optional)In case this component is registered to a composable class which is not convertible to T then OnCreatedAt or the others will be silently ignored.
If OnCopiedAt is defined, it is called when the component got copied to its new parent, and the previous component boxed in FAny.
If OnMovedAt is defined, it is similarly called when the component got moved to its new parent. Components however are not move constructed, simply they have their ownership transferred, for this reason there's no "source" component argument, as that would be redundant.
Definition at line 52 of file Composition.h.