question

Greggory Addison avatar image
Greggory Addison asked

How to retrieve blueprint compatible Inventory data in C++ [UE5]?

Currently I'm working on a subsystem for economy in my project. Im not able to use UFUNCTION(BlueprintPure) for any of my getter functions for things like the FItemInstance . I want to be able to pass in an item reference from a UI button and run checks so that I can give the player the correct in game asset. I also want to compare items that the player is selecting against what they already have in their inventory. But im not able to pass FItemInstance as a parameter to a blueprint exposed function. What is the correct way to achieve this?

In this picture im trying to get a copy of the result struct but its the same error if I try to get a copy of the FItemInstance struct as well.

Player DatadataIn-Game EconomyunrealPlayer Inventory
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Made Wang avatar image Made Wang commented ·

I will look into it.

0 Likes 0 ·

1 Answer

·
Made Wang avatar image
Made Wang answered

Did you get the error message "cannot find class ' ', to resolve delegate 'ClientModels'"? After some testing, the API itself is fine, but Unreal doesn't seem to allow such data structures to be given directly to blueprints. I'm not an expert in Unreal, not sure if Unreal has some limitations in C++ and Blueprint cross programming, I suggest you seek professional support from the Unreal forum.

In addition, PlayFab Marketplace Plugin also supports blueprints. You can directly call APIs in blueprints to get these data.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Greggory Addison avatar image Greggory Addison commented ·

If I use the static functions on the UPlayFabClientAPI class I dont get any errors but I wonder if this is the correct way to handle getting this information.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]