Jump to content
  • Advertisement

lubby

Member
  • Content count

    217
  • Joined

  • Last visited

Community Reputation

290 Neutral

About lubby

  • Rank
    Member
  1. lubby

    Feature chat: Type/member annotations

      I did not want to re-architect the code flow, so ended up using the private types to enable exposed variables, this is simple enough as I have the asIObjectType pointer available from each instance. This is sufficient enough for my current use case but won't hold up for more advanced techniques. So if you do decide to expose the metadata via the asIObjectType that would be great.
  2. lubby

    Feature chat: Type/member annotations

      Fortunately this thread is active today, I just came looking for a solution to flagging user editable class variables with metadata. const char *CScriptBuilder::GetMetadataStringForTypeProperty(int typeId, int varIdx); // Expects the type and index for that type Though when I need to peek at my user editable values CScriptBuilder is long gone out of scope. Additionally, I am using    int count = asIScriptObject::GetPropertyCount() aslScriptObject::GetAddressOfProperty(i); // Traversing all properties These two functions don't actually pair up without some work. What would be great is aslScriptObject::GetPropertyMetadata(i) and friends!      
  3. lubby

    RegisterObjectMethod help

      Expert enough to pick that up. Thanks it fixed the build script failure as you could expect.   After passing the build script stage I have changed my registration call to exactly match the (minus the virtual) method, its still got serious issues, but I think I see what's going on now. Thank you again for the sanity check!  
  4. lubby

    RegisterObjectMethod help

    Hi all,   I feel like a right beginner with this question. So apologies. I have had a real hard time finding concrete examples or documentation flow to learn the basics, so thus far I have struggled by - by using copy and paste from the samples and lots of trial and error.   So I am trying to register this object method   class TransformObject { public: virtual const Vector4& GetPosition() const; } The only way I have been successful in registering this method is as such... RegisterObjectMethod("TransformObject", "Vector4 GetPostion() const", asMETHOD(TransformObject, GetPosition), asCALL_THISCALL); ASSERT(r>=0, "Error"); Vector4 is a class and is registered as an object type like so... RegisterObjectType("Vector4", sizeof(Vector4), asOBJ_APP_CLASS_ALLFLOATS | asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK); ASSERT(r>=0, "Error"); Using scriptBuilder to build the script containing this line... Vector4 position = self.GetPosition(); the following errors are output  movabletest.as (18, 30) : ERR : No matching signatures to 'TransformObject::GetPosition()' movabletest.as (18, 25) : ERR : Can't implicitly convert from 'const int' to 'Vector4'. Can anyone point me to my error please. Really perplexed.   Cheers!!
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!