I believe that your UInventoryComponent property in your APlayerCharacter class needs a UPROPERTY(VisibleAnywhere) specifier.
I believe that your UInventoryComponent property in your APlayerCharacter class needs a UPROPERTY(VisibleAnywhere) specifier.