# ZeroInventory world package

Generated 2026-11-26T11:39:37.930Z for **My VRChat world**.

- API base URL: `https://zeroinventory.zerotwo.eu.org`
- Pinned Discord server: `1316715390281449512`

A read-only UdonSharp viewer for the VRChat world side of ZeroInventory.

What the package puts in your project:

```
Assets/ZeroInventory/
  README.md
  zeroinventory.config.json
  Editor/ZeroInventorySetup.cs      creates the program assets and builds the UI
  Scripts/ZeroInventoryClient.cs    loads the pasted world URL
  Scripts/ZeroInventoryHud.cs       optional UI driver
```

The two program assets (`Scripts/ZeroInventoryClient.asset` and
`Scripts/ZeroInventoryHud.asset`) are generated in your project rather than
shipped, because they have to reference the UdonSharp copy you actually have
installed.

## What a world can and cannot do

VRChat blocks more than it first seems, and the whole design follows from it:

- `new VRCUrl(...)` can only be called at editor time. A world cannot build a
  URL that contains a token, an item id or an action.
- Udon has no HTTP POST, no `UnityWebRequest` and no coroutines.
- String loading allows about one download per five seconds.

So the world reads and displays; the website is the only place that changes
anything. There is no in-world pairing, account linking, move or rotate.

## Requirements

- Unity 2022.3 with the VRChat SDK3 Worlds package
- UdonSharp (installed with the VRChat SDK)
- A public HTTPS origin for the console
- A world URL per player, copied from Permissions > Your access > World view URL
- Strings from your own domain are not on VRChat's allowlist, so every player
  needs "Allow Untrusted URLs" enabled in VRChat's settings

## Install

1. Import `ZeroInventory-World.unitypackage` (`Assets > Import Package > Custom
   Package`). The editor script creates the UdonSharp program assets (`.asset`)
   for both behaviours automatically; if that did not happen, run
   `ZeroInventory > Create UdonSharp program assets` from the menu bar.
2. Run `ZeroInventory > Build world UI` from the menu bar. It creates a
   `ZeroInventory` GameObject with both components, a world-space Canvas with a
   `VRCUrlInputField`, status, items and feedback text, and the Connect,
   Disconnect, Previous, Refresh and Next buttons. Every reference and every
   `OnClick` is wired for you; UdonSharp cannot add listeners from code, so this
   is done in the editor.
3. Run `ZeroInventory > Detect world id` after attaching the scene to a world in the VRChat
   SDK control panel. The editor script reads the blueprint id (`wrld_…`) from the VRChat
   pipeline manager and bakes the registration URL, because Udon cannot build a URL at run
   time. The world registers itself on its first load and then shows up on the website's
   Worlds tab with its scene name and blueprint id; characters are assigned to it there.
4. Move the `ZeroInventory` object where players should see the panel; it is
   built at eye height 1.6 m in front of the origin, scaled to 0.9 m by 0.7 m.
5. Upload the world over HTTPS.

The panel starts closed. On desktop, press **I** to open or close it; it stays
hidden for VR players for now (`Desktop Only` on the HUD). Every time it opens it
is placed 1.2 m in front of the player's head and turned to face them, so its
position in the scene does not matter; `Panel Distance` and `Panel Height Offset`
on the HUD move it. The menu item can be re-run at any time: it rebuilds
`ZeroInventory/UI` and rewires everything, and leaves the rest of your scene
alone.

## Using it in game

1. The player opens the console, goes to Permissions > Your access and copies
   their world URL.
2. On desktop they press I to open the panel, paste the URL and press Connect.
3. The world loads the URL and lists every character that key can see, keeping only the ones
   assigned to this world (a character can belong to several worlds) plus the ones assigned
   to no world at all.
4. Next / Previous switch characters locally; no extra request is made.
5. The URL is polled every ten seconds, so changes made on the website appear
   in world within a few seconds.
6. The right column has a `People (n)` header. Click it to fold the list of
   everyone currently in the instance away, click it again to open it; your own
   name is marked "(you)". VRChat hands that roster to the world, so it needs
   no request and no extra permission. Up to nine names are shown, and the
   header always carries the full count.

The URL contains a personal read key that is valid for 30 days and only ever
returns that member's own characters. Press "New URL" on the website to rotate
it; the old URL stops working.

## Feed format

`GET /api/world/v1/shelf?key=<key>` returns `text/plain`, one record per line:

```
VER|2
CHARS|2
CHAR|<characterId>|<name>|<status>|<player>
CONTAINER|<characterId>|<key>|<label>|<cols>|<rows>|<maxSlots>|<used>
ITEM|<characterId>|<itemId>|<definitionId>|<icon>|<name>|<container>|<x>|<y>|<rotation>|<quantity>|<w>|<h>
```

Pipe characters and newlines inside names are replaced with spaces.

## Public methods on the client

| Method | Purpose |
| --- | --- |
| `ConnectFromInput()` | Load the URL from the assigned `VRCUrlInputField` |
| `RefreshNow()` | Reload the feed immediately |
| `NextCharacter()` / `PreviousCharacter()` | Switch the displayed character |
| `SelectCharacter(int index)` | Pick a character by index |
| `Disconnect()` | Stop polling and clear the display |
| `PollTick()` | Scheduled by the client; do not call manually |

Public fields such as `connected`, `loading`, `characterName`,
`characterCount`, `selectedIndex`, `inventoryText`, `statusMessage` and
`lastError` are meant to be read by the HUD.

## Troubleshooting

- Nothing loads at all: the player has not enabled "Allow Untrusted URLs", or
  the world was uploaded with an `http://` origin instead of `https://`.
- `That world URL is not valid or it expired`: generate a new URL on the
  website; old ones expire after 30 days or when a new one is made.
- No characters listed: the signed-in Discord account has no characters on the
  pinned server.
- Unity reports a method is not exposed to Udon: update the VRChat SDK.
