• Advertisement
Sign in to follow this  

Custom Binding

This topic is 3737 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

Hi! I have a question, is there any way i can do custom binding of classes? Imagine I want to deal with some abstract game data as if it was part of a class, containing methods and properties (but they actually don't exist in game, or not as such). So basically, i'd like to create some object that tells angelscript which functions and properties it has, so i can handle myself the behavior on set/get/operators/etc. (maybe something like fallbacks in lua?) Cheers

Share this post


Link to post
Share on other sites
Advertisement
You can register your own classes with AngelScript. You'll then tell AngelScript what methods and behaviours it has. Since the methods and behaviours are implemented by the application you can have them pick up their information from anywhere you want.

AngelScript currently doesn't support setters and getters for properties, though it is planned for the future. Currently you'll have to implement this via exposing two methods instead.

Regards,
Andreas

Share this post


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

  • Advertisement