Hi,
For the creation of instances, I would like it to look like this :
//in angelscript:
void Function()
{
Sprite @mMySprite = Sprite.Create();
}
I would like to stay away from global functions. If I have n object types to create, I would have to have n x global creates to do. And in our case, n might be big (in fact, we cannot know in advance since we parse and generate code from the production's project)
What I was searching for was a way to create a global function, which is a templated function, but mask it under an object type in AngelScript, for exemple :
engine->RegisterGlobalFunction("Sprite@ Sprite.Create()", asFUNCTION(SomeClass, Factory<Sprite>), asCALL_CDECL);
Or in english : I know this is a global function but make the user belive it's a static so I can show it in the script IDE's intellisense and in scripts
Thanks!