1.4 KiB
name, description, metadata
| name | description | metadata | ||
|---|---|---|---|---|
| pickable-vestigial-networkobject | Existing Pickable prefabs carry an unused FishNet NetworkObject; the canonical generated prefab omits it. |
|
The hand-authored Pickable prefabs (e.g. Prefabs/Food/Pickable/Raw Steak.prefab,
Prefabs/Pickable/Tools/axe01.prefab) still carry a FishNet NetworkObject component, left
over from a pre-refactor design.
Why it's dead: Pickable now derives from WorldObject (not NetworkBehaviour), and
PickableRegistry.SpawnDropVisual creates drops with a plain Instantiate(item.WorldPrefab,…)
— a local visual, never a network spawn. The registry syncs only ids/drop records. So the
NetworkObject on those prefabs does nothing. This matches CLAUDE.md §3 ("World objects
(pickables, harvestables) are not NetworkObjects").
How to apply: When generating or authoring world pickup prefabs, do NOT add a
NetworkObject. Required pieces are: the Pickable layer (11), a non-trigger collider on the
SAME GameObject as the Pickable (the interactor reads IInteractable via
hit.collider.TryGetComponent), the Pickable script wired to its ItemData, and id = -1
(scene instances get a baked id via Tools ▸ Ashwild ▸ Assign World Object IDs). The Ashwild
Database tool (ashwild-database-tool) generates them this clean way. The vestigial
NetworkObjects on old prefabs could be stripped in a cleanup pass.