Skip to main content
Inspiring
May 20, 2025
Solved

Function this.world.WorldInventory.grantItemToPlayer doesn't work as expected

I have been working on the new Economy world tutorial from Horizon World Documentation and find that line 82

WorldInventory.grantItemToPlayer(player, this.props.lootSKU, this.props.lootCount);


doesn't increase the quantity of the in-world item as expected.

Here is the screenshots of the setup and debugging console messages:




Reference: https://developers.meta.com/horizon-worlds/learn/documentation/tutorial-worlds/economy-world-tutorial/module-2-setup

SeeingBlue
Honored Contributor
August 6, 2025

Might be a bug, but there is also a delay before purchases are reflected this way. Might need to wait a couple seconds before checking their entitlements.

Also is your quantity value greater than 0?

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar

6 replies

eshakm2024
Community Manager
May 22, 2025

Hi MResearch, 

This could be a bug as well, can you please file a bug through feedback hub for this issue. I have created a ticket for this for further review. 

Thanks  

Up and Coming
August 6, 2025

I have placed a report from the Desktop Editor. I am experiencing the same issue, examined and redo the steps mentioned in the tutorial a few times. still stuck at module 3 of the tutorial. Wondering anyone else encountering this?

Up and Coming
August 9, 2025

Yes it's working now! small delay but I can move on to module 4 !

SeeingBlue
Honored Contributor
August 6, 2025

Might be a bug, but there is also a delay before purchases are reflected this way. Might need to wait a couple seconds before checking their entitlements.

Also is your quantity value greater than 0?

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
willykc
New Participant
August 6, 2025

I'm experiencing the same issue on my world, it was working great until yesterday. I also noticed that getting entitlement quantities always returns 0, even though the player's inventory shows the items with quantities higher than 0.

willykc
New Participant
August 8, 2025

I just noticed all is working again as expected