Closed Fexty12573 closed 7 months ago
Actually, I will probably change the extern "C"
based API to one that requires the native component to only export 2 functions:
struct InternalCall {
const char* Name;
void* FuncPtr;
};
// Tells the PluginMananager how many InternalCalls to allocate
extern "C" int get_internal_call_count() { return 2; }
// Retrieves the actual call information
extern "C" void get_internal_calls(InternalCall* icalls) {
icalls[0] = { "Sum", &sum };
icalls[1] = { "ProcessData", &process_data };
}
This also gives you the option to directly bind game functions to internal calls for convenience.
Current API (Still up for debate)
Managed API
Native API
The function name needs to match exactly on the managed and native ends.