Jump to content
  • Advertisement
Sign in to follow this  
zopenge

How can I register static method of class by angelscript ?

This topic is 3770 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!