Jump to content
  • Advertisement
Sign in to follow this  
izackp

what does offset point to in GetProperty

This topic is 2002 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!