• Advertisement
Sign in to follow this  

How can I register static method of class by angelscript ?

This topic is 3652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Seems the same question of registering enum ~~ :) Class A { static float SomeFunc( ) { return 1.0f; } }; How to register A::SomeFunc( ) ? thanks !!!

Share this post


Link to post
Share on other sites
Advertisement
A static class method really is a global function, so that's how you register it with AngelScript:


engine->RegisterGlobalFunction("float SomeFunc()", asFUNCTION(A::SomeFunc), asCALL_CDECL);


Regards,
Andreas

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement