Summary
Custom FoodItem subclasses placed on surfaces (tables) do not render their 3D model on the client. The item works correctly everywhere else (icon, tooltip), the server places the object with zero errors, and we've traced the exact client-side registration code path (ModBundleManager.cs, decompiled) but still can't get the model to appear once placed.
What works
Item shows correct icon, name, description, stats in tooltip/inventory
"Place on Surface" preview shows the model correctly before confirming placement
AssetBundle builds clean with zero Unity console errors
Server places the object with no errors in server log
What doesn't work
After confirming placement on a table, the 3D model is invisible (object is still functionally present — has implicit collider, "Use" prompt appears, can be picked up with the table)
In-hand display is also currently not working for this item — was working briefly with one structural variant, broke again during later restructuring
Root cause investigation (decompiled ModBundleManager.cs)
We decompiled Eco.Client.dll and traced the full registration path:
- Bundle/scene loading (LoadAssetBundle)
loadedObjects is only populated if the bundle is a scene bundle, then scanned
-
Recursive object discovery (FindModObjectsRecursive)
-
Item map construction (BuildItems)
Looks up itemModPrefabs by the server-side ViewClassInfo.ServerName (matching C# class name, e.g. BloodyMaryItem).
-
ItemData generation (GenerateItemData)
-
Final lookup (PreviewWorldObjectUtil.GetPrefab via ModBundleManager.GetItemPrefabData)
What we configured to match this exactly
BloodyMaryItem GameObject/prefab, ends in Item
Contains a child named exactly Tool, containing the 3D model
Contains a child named exactly Avatar (empty AttachPointName, matching base-game FoodItemTemplate reference which also has it empty)
Tagged scene bloody mary.unity to AssetBundle bloodymary (scene-only bundle, no prefabs in the same bundle — Unity does not allow mixing scenes and prefab assets in one bundle, confirmed via repeated Cannot mark assets and scenes in one AssetBundle build errors)
All relevant prefabs (BloodyMaryItem, PlacementBloodyMaryObject, PlacementFoodItemObject) exist as scene object instances under a disabled root container (Items) inside that same scene, reachable via GetRootGameObjects() → recursive descent → FindModObjectsRecursive
Removed AssetBundle tags from the individual prefabs themselves (tagging both scene and prefabs caused the Unity build conflict above)
Confirmed via clean Console output (zero errors/warnings) that the bundle builds successfully with this structure
Result
Even with this structurally-correct setup (verified line-by-line against the decompiled registration path), the model still does not render once placed on a table, and in-hand display is also currently broken for this item.
Known unknowns / things we couldn't verify
Debug.LogError/Debug.LogWarning output from FindModObjectsRecursive (e.g. "Duplicate object name detected" or "Missing following icons") confirming whether registration runs and fails, vs. not running at all.
Don't know whether bundleFilesToLoad for a local dev/test server actually includes user mod .unity3d files from the expected mod folder path, or whether there's an additional manifest/registration step for user mods specifically — the non-editor branch only reads Application.streamingAssetsPath for *.unity3d files.
Questions
Is there a required manifest, registration step, or specific folder structure for mod .unity3d bundles to be discovered by bundleFilesToLoad at runtime, beyond tagging Unity assets to an AssetBundle of that name?
Given the source above, is our understanding of the registration path correct, and if so, why would a correctly-structured scene-bundle mod item still fail to register?
Summary
Custom FoodItem subclasses placed on surfaces (tables) do not render their 3D model on the client. The item works correctly everywhere else (icon, tooltip), the server places the object with zero errors, and we've traced the exact client-side registration code path (ModBundleManager.cs, decompiled) but still can't get the model to appear once placed.
What works
Item shows correct icon, name, description, stats in tooltip/inventory
"Place on Surface" preview shows the model correctly before confirming placement
AssetBundle builds clean with zero Unity console errors
Server places the object with no errors in server log
What doesn't work
After confirming placement on a table, the 3D model is invisible (object is still functionally present — has implicit collider, "Use" prompt appears, can be picked up with the table)
In-hand display is also currently not working for this item — was working briefly with one structural variant, broke again during later restructuring
Root cause investigation (decompiled ModBundleManager.cs)
We decompiled Eco.Client.dll and traced the full registration path:
loadedObjects is only populated if the bundle is a scene bundle, then scanned
Recursive object discovery (FindModObjectsRecursive)
Item map construction (BuildItems)
Looks up itemModPrefabs by the server-side ViewClassInfo.ServerName (matching C# class name, e.g. BloodyMaryItem).
ItemData generation (GenerateItemData)
Final lookup (PreviewWorldObjectUtil.GetPrefab via ModBundleManager.GetItemPrefabData)
What we configured to match this exactly
BloodyMaryItem GameObject/prefab, ends in Item
Contains a child named exactly Tool, containing the 3D model
Contains a child named exactly Avatar (empty AttachPointName, matching base-game FoodItemTemplate reference which also has it empty)
Tagged scene bloody mary.unity to AssetBundle bloodymary (scene-only bundle, no prefabs in the same bundle — Unity does not allow mixing scenes and prefab assets in one bundle, confirmed via repeated Cannot mark assets and scenes in one AssetBundle build errors)
All relevant prefabs (BloodyMaryItem, PlacementBloodyMaryObject, PlacementFoodItemObject) exist as scene object instances under a disabled root container (Items) inside that same scene, reachable via GetRootGameObjects() → recursive descent → FindModObjectsRecursive
Removed AssetBundle tags from the individual prefabs themselves (tagging both scene and prefabs caused the Unity build conflict above)
Confirmed via clean Console output (zero errors/warnings) that the bundle builds successfully with this structure
Result
Even with this structurally-correct setup (verified line-by-line against the decompiled registration path), the model still does not render once placed on a table, and in-hand display is also currently broken for this item.
Known unknowns / things we couldn't verify
Debug.LogError/Debug.LogWarning output from FindModObjectsRecursive (e.g. "Duplicate object name detected" or "Missing following icons") confirming whether registration runs and fails, vs. not running at all.
Don't know whether bundleFilesToLoad for a local dev/test server actually includes user mod .unity3d files from the expected mod folder path, or whether there's an additional manifest/registration step for user mods specifically — the non-editor branch only reads Application.streamingAssetsPath for *.unity3d files.
Questions
Is there a required manifest, registration step, or specific folder structure for mod .unity3d bundles to be discovered by bundleFilesToLoad at runtime, beyond tagging Unity assets to an AssetBundle of that name?
Given the source above, is our understanding of the registration path correct, and if so, why would a correctly-structured scene-bundle mod item still fail to register?