Advertisement

When can i use engine->GetObjectTypeByName

Started by July 06, 2012 09:51 PM
1 comment, last by saejox 12 years, 5 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.
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

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


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