• Advertisement
Sign in to follow this  

what does offset point to in GetProperty

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

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
Advertisement

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
Sign in to follow this  

  • Advertisement