Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


- - - - -

How can I register a static const class field?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 wdl7770016   Members   -  Reputation: 104

Like
0Likes
Like

Posted 29 April 2013 - 02:59 AM

I  want to register a const unsigned int value

but the enum is only support int type

so I can't use it

finally I only could use RegisterGlobalProperty

but it can't recieve a const value

....How can I do it ?



Sponsor:

#2 Jake Albano   Members   -  Reputation: 649

Like
0Likes
Like

Posted 29 April 2013 - 10:47 AM

Angelscript doesn't currently support static class members in the script language, if that's what you're asking.

 

If you're trying to expose a C++ static class member to Angelscript, you can cast the const away with const_cast (I can't believe I'm recommending the use of const_cast). There's probably a better way, but that's how I've been doing it in my engine.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS