RED4ext::IScriptable(the class that all classes inherit from in Redscript). The header for this needs to be defined at the top-level, or in a namespace (outside any function):
GetNativeType()that returns a reference to our CP2077 type. The name of
customControllerClassdoesn't matter in this context, as it's pointing to our type in RED4ext.
PostRegisterTypes) to register the type with CP2077 at the appropriate times. The first one that gets called sets the
isNativeflag for the class, which will match the
nativedescriptor on the Redscript side, and registers the type to CP2077:
IScriptable, to match the class.
RED4ext::RTTIRegistrator::Addin our main function: