When can i use engine->GetObjectTypeByName

Started by
1 comment, last by saejox 11 years, 9 months ago
Hi,

engine->GetObjectTypeByName(SomeClassName);

returns 0 while

mod->GetObjectTypeByName(SomeClassName);

return expected object.
i have only 1 module.

Are these two different from each other?
Do i have to do something special to get object type from engine?

thanks.
Advertisement
The engine method only returns registered types.

The module method returns the types available to module too, i.e. whatever was declared in the script.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game


The engine method only returns registered types.

The module method returns the types available to module too, i.e. whatever was declared in the script.

Regards,
Andreas


understood, thanks.

i am doing this now,


asIScriptContext *ctx = asGetActiveContext();
asIScriptModule *mod = ctx->GetEngine()->GetModule(ctx->GetFunction()->GetModuleName());

This topic is closed to new replies.

Advertisement