![]() |
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 of IStrictComponent, it is a compile error to register this class to a composable class which is not convertible to T.
If OnCopiedAt is defined, it is called when the component got copied to its new parent. The second argument is the source component.
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 82 of file Composition.h.