Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

mika-archived/VRChat-InventorySystem

Repository files navigation

VRChat InventorySystem

Experimental Unity Project that provides Inventory System in VRChat.

NOTICE: THIS PROJECT IS EXPERIMENTAL. PLEASE USE IT AT YOUR OWN RISK.

Requirements

  • Unity 2018.3 or higher
    • This system used new features in Unity 2018.3.
  • VRChat 2020.1 or higher

Video

https://twitter.com/6jz/status/1256876847679172608

How to use (Japanese)

https://docs.mochizuki.moe/VRChat/InventorySystem

How to use (English)

Preparation

  1. Download UnityPackage from BOOTH or build by yourself.
  2. Import UnityPackage to your avatar project.
  3. Drag and Drop InventorySystem_DefaultXXX.prefab to your hierarchy tree.

Automatically Setup (Recommend)

  1. Open Inventory Editor from Mochizuki/VRChat/Inventory Editor in menubar.
  2. Drag and Drop avatar GameObject into the Avatar field.
  3. Drag and Drop collider GameObject into the Collider field.
  4. Drag and Drop object that you want to in and out into the Object field.
  5. Drag and Drop trigger's parent GameObject into the Parent field.
  6. Click Unpack and Configure Prefab (Breaking)

Manual Setup

  1. Unpack Prefab.
  2. Move InventoryTrigger to any location on the avatar.
  3. Reset Transform.
  4. Replace Shims Sphere to GameObject or other objects.
    • NOTE: The object name must be Shims.
  5. Configure Collider-s Triggers in Particle System.
    1. Replace COLLIDER in Colliders to your hand.
  6. Delete COLLIDER and INVENTORY_TRIGGER.
  7. Move InventoryObject to any location on the avatar.
    • NOTE: I recommend placing the child of the GameObject that attached Parent Constraint.
  8. Reset Transform.
  9. Move your object to brother of PUT_YOUR_INVENTORY_ITEM_HERE.
  10. Delete PUT_YOUR_INVENTORY_ITEM_HERE and INVENTORY_OBJECT.
  11. Delete InventorySystem_DefaultXXX.

Note

This prefab is optimized for Shapell (and other common humanoid avatars).
If you want to use a larger/smaller avatar than the common humanoid avatar, change the values to below.

  • (PrefabRoot)/INVENTORY_TRIGGER/InventoryTrigger - Scale in Transform
  • (PrefabRoot)/INVENTORY_TRIGGER/InventoryTrigger/Collider - Radius Scale in Triggers in Particle System

Known Bugs

  • Depending on how long it took to initialize, it may appear to be in an incorrect state.
    • Currently, we have confirmed the symptoms only on Unity Editor

References

How It Works (Japanese)

https://hackmd.io/@mikazuki/Sko71kl2I