Original Post
I'm writing a ScriptManager c++ class that has a registerType(string& name) method that I would like to register as a global function in the script.
I've got RegisterGlobalFunction working for global methods and I could use a proxy function or make it static but I'm wondering if there's a proper way to do this.
registerEntitypType looks like this:
I've tried both of these:
After a little bit of searching I found this, is that still the state?
I've got RegisterGlobalFunction working for global methods and I could use a proxy function or make it static but I'm wondering if there's a proper way to do this.
registerEntitypType looks like this:
void ScriptManager::registerEntityType(string& name) {
cout <<"Registering type \"" <<name <<"\"" <<endl;
}
I've tried both of these:
r = mEngine->RegisterGlobalFunction("void registerType(string& in)", asFUNCTION(&ScriptManager::registerEntityType), asCALL_CDECL);r = mEngine->RegisterGlobalFunction("void registerType(string& in)", asMETHOD(ScriptManager, registerEntityType), asCALL_THISCALL); After a little bit of searching I found this, is that still the state?