Custom Events & Functions
Last updated
Last updated
The I/O system was designed in a way to be easily extensible. You can register custom events and functions with the I/O system for any of your actors using the ActorIOInterface
.
In order to expose custom events and functions, you need to add the ActorIOInterface
to your actor. The LogicActorBase
class already has this interface implemented, so if you are creating a custom logic actor then you can skip this step.
Override the RegisterIOEvents
function of the I/O interface, and use RegisterEvent
to add an entry to the event registry of this actor.
Override the RegisterIOFunctions
of the I/O interface, and use RegisterFunction
to add an entry to the function registry of the actor.
When registering an I/O function for the actor, you can specify a SubobjectName
. If set, the I/O system will call the function on the specified subobject instead of the actor itself.
The SubobjectName
should be the name of a component (or any other subobject) that is part of the actor.