Question regarding the Setup for ItemPickUps with the InputSystem

Finnt

New member
Hello, I am using the Ultimate Inventory System Asset for the first time and have trouble getting ItemPickUps to work.

I am using:
Unity Version 2022.3.11f1
Opsive Ultimate Inventory System 1.2.19
Unity Input System Package 1.7.0
Integration for InputSystem Version 2

I followed the "Getting Started" section of the documentation. It seems to be working. I can open the Inventory Menu and see the Items in there. For the setup I created a new InventoryDatabase. I am using my own Character Controller and added the scripts through the Setup to my prefab. I followed the instructions in the documentation for the Input System Integration. It did not describe which Version of the Integration should be used. I used Version 2.

The Problem is, that the ItemPickUp GameObject does not cause a prompt to interact and pick it up. The UI appears when the Character approaches, but the prompt is missing and the "E" Input does not work to pick the Item up. I checked to see if it works in the DemoScene. It does, so I think I might have done something wrong in the Setup for my scene. But I am relatively sure, that I followed the instructions.

In the ItemPickUp Section of the documentation it says, that the ItemPickUp requires a Trigger Collider. After the Setup, the created GameObject does have a collider, but it is not set to trigger. Setting it to Trigger, does not fix the problem, but causes the object to fall through the ground, so I unchecked it again. The documentation also says: "check the “Pickup On Trigger Enter” option, the game object layer, the Pickup Ability and the Physics settings". But I could not find the Option and I do not know what I should check about the Layer, Ability and Physics Settings.

Another odd problem, that I noticed was, that once I used the DemoScene to check if it works there, my own scene would break: The Cursor disappears and no Input even for the menus is detected. The cursor only reappears once i press the Escape-Key. This is not a huge problem, because I could simply not use the Demo Scene, maybe I would remove the files from my project to make sure they do not destroy my own Scene. But maybe this other issue might help solving the problem, because I think in the Integration Documentation it says, that the Demo Scene should not work with the new Input System. In my case it does though, which might be an indicator, that the Integration did not work as intended.

Maybe the issue lies with:
- Scene Setup
- Scene Setup for ItemPickUp
- New InventoryDatabase
- Custom Character Prefab
- Input System Integration
- or somthing else entirely : )

I did the process twice on two different PCs (but for the same project) and had this issue. Can someone help me to figure out this problem? Thanks for any help!
 
So as you said, if it works in the demo scene but not your own, then most likely the issue has to do with the setup.

The Input "E" is defined by the InputActionObject you've set on your character and the button name you've set on the InventoryInteractor. First check that it looks like the integration demo scene.

But my guess is that it has to do with theLayer/ LayerMask on the Interactor/Interactable.

If you can't figure it out, then If you show me the full inspector screenshot of your Player with the InventoryInteractor script.
And another screenshot of your ItemPickup inspector, including the Interactable script.
Then I might be able to point you in the right direction
 
Thank you for your quick response. I am not sure if I got the correct demo scene, but it is the one in the integration folder. There is a missing prefab in there. The scene looks like this:

InventorySystem_IntegrationDemoScene.png

I was not able to figure the problem out so far, so I am sending the screenshots of the inspector for the Player GameObject:
InventorySystem_Character.png
And of the ItemPickUp Template GameObject
InventorySystem_ItemPickUpInspector.png
 
Looks like the new Input System integration demo scene needs to be updated for UCC V3, I will notify @Justin about it.

As for your interaction issue. You need a trigger to detect the interaction.
So you'll need either to set the collider on the Pickup as Trigger:
1702484388690.png
OR
You can add another Collider component (of bigger size) on the pickup or as a child. and set that as IsTrigger.
 
Hello, thank you for your response. I am very sorry for responding so late! I only got around to trying the Inventory System again just now and I am not sure what my issue was before, but I tried importing and setting up the Inventory System again and the problem was solved.

I tried adding a trigger on the ItemPickup Object and as a child. But I think it already does have a Trigger on the child object 'Model Parent', that I did not notice before.

For some time I thought it did not work again, until I realized, that I used the the key 'E' for Interact, but the correct key was 'F' for Action in the InputAsset. I thought that last time I tried both keys and neither worked, but maybe I only tried 'E' then. In the Instructions Panel of the Classic UI Schema it says: "Interact 'E' | Fire3", which is why I thought this was the correct button. But with the 'F' button, picking up the item works as expected.

About the other problem, that I wrote about in my first message: The cursor disappeared in Play Mode and no inputs were recognized. But this was actually not an error at all. The missing cursor is a setting of the 'Unity Input System' component on the Character GameObject, that comes with the Input System Integration. ('Disable Cursor' and 'Enable Cursor with Escape') When I disabled these settings, the cursor is there and the Input for my game works again. It did not, because it needed the cursor.

Thank you very much for your help!
 
Top