Sign in to follow this  

what does offset point to in GetProperty

Recommended Posts

so for get property in the asScriptObject class:


GetProperty(asUINT index, const char **name, int *typeId = 0, bool *isPrivate = 0, int *offset = 0, bool *isReference = 0, asDWORD *accessMask = 0);


It assigns an offset which I assume is pointing to the data for that property, but i can't exactly tell what it is pointing to. Is it the actual raw data or some sort of angelscript wrapper?


What I'm trying to accomplish is assigning to a angelscript class's members. I need to be able to assign values (ints, ect) and references to other script objects.


Any help would be greatly appreciated smile.png

Edited by izackp

Share this post

Link to post
Share on other sites

The offset points to the location within the object where the property is. If isReference is true, the property is stored as a pointer to the actual property. In this case you'll need to deference the pointer after adding the offset.


It may be easier to use asIScriptObject::GetAddressOfProperty() instead of asIObjectType::GetProperty.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this