🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Const attributes and methods

Started by
0 comments, last by WitchLord 15 years, 7 months ago
Hi, I just wonder, how can we register the const attributes and methods? Do I need to register them as a global? Cheers
Advertisement
You can register the const methods as normal object methods, just append const after the parameter list (just like in C++).

engine->RegisterObjectMethod("MyObj", "void func() const", asMETHOD(MyObj,func), asCALL_THISCALL);


The const attributes must be registered as globals though.

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

This topic is closed to new replies.

Advertisement