- Home /
Problem with inventory asset' script and its working
I am working with InventoryMaster asset from asset store, out of which I am using only inventory bar and craft system for my VR game for android. All the movements and actions of player are configured with Bluetooth controller. What i want that when the player picks up an item, it should display on inventory and as well as on craft system simultaneously that means there should be no use of drag and drop. In more simpler words player do not need the requirement of drag and drop function for moving the item from inventory bar to the craft system, he only need to pick the item and this item appears on both inventory bar and craft system. I tried to make some changes in the scripts but didnt get the result.What changes should I need to do in the script so that functions as expected. Here is the link to the asset- https://assetstore.unity.com/packages/tools/gui/inventory-master-ugui-26310
Please do have a look over the script and suggest me some solution that i can apply to my game.
To pick up things, you can use a raycast. Raycasts sends a line over to the point of your choice and gives you relevant info if it hits something. So hit a ray cast - > Check if it hit something -> Check if its an object -> check what kind of object -> choose what to do with object -> pick up object. Then you should have some kind of a list that has all the items listed in the inventory, when the player chooses to pick up the item, then you add the item to the list and update your UI to reflect that. It's quite simple actually.
Actually player is picking up item conveniently and is getting stored on inventory. But the problem is that one have to drag and drop that item from inventory bar to craft system panel for further usage and while using bluetooth controller, drag and drop function cannot be applied and all buttons of controller are occupied. I only want that when an item is picked up, it should be availabe on both inventory bar and craftsystem at the same time, so it becomes easy for the player to play.
Your answer
![](https://koobas.hobune.stream/wayback/20220612160333im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Toggle between VR and Normal Mode 0 Answers
Question about an inventory system idea 2 Answers
Multiple Cars not working 1 Answer