I have been able to receive an "FEntityKey" structure from my login using the ClientAPI with "LoginTitlePlayerAccountEntity" set to true.
However, the key returned is a ClientModels::FEntityKey.
When I try to use this structure to set entity objects in a EntityModels::FSetObjectsRequest, this stucture expects an EntityModels::FEntityKey.
I can create a conversion function, but I wonder if maybe I'm using the SDK incorrectly.
I haven't seen any examples using the new entity API in C++.
Anyone with experience in this would be a big help!
Hello, thanks for your question.
The conversion function you've written for now, is your best option. We don't have a better solution at this time.
I will file this as a feature request that improves customer quality of life. Since our SDKs are automatically generated, this is slightly more complicated than just copy-pasting here or there.
My own solution for now is to have an
EntityModels::EntityKey myKey;
somewhere in my project, and set myKey like this:
OnLoginSuccess(result) { myKey.Id = result.EntityToken.Entity.Id; myKey.Type = result.EntityToken.Entity.Type; myKey.TypeString = result.EntityToken.Entity.TypeString; }
Any similar conversion function is also fine.
I apologize that we are unlikely to have a better answer anytime soon.
2 People are following this question.