From 3D Asset to Working Worktable: Difference between revisions

From Eco - English Wiki
[unchecked revision][unchecked revision]
WugWugg (talk | contribs)
WIP
 
WugWugg (talk | contribs)
mNo edit summary
Line 45: Line 45:
# Verify you can find your assets from the explorer. If following along, the assets are at <code>Assets/PolyRonin/Medieval Market Stalls</code>.
# Verify you can find your assets from the explorer. If following along, the assets are at <code>Assets/PolyRonin/Medieval Market Stalls</code>.
# Load in a demo scene, if provided, and make sure everything looks okay.
# Load in a demo scene, if provided, and make sure everything looks okay.
## For those following along, double click on the ''Demo'' scene at <code>Assets/PolyRonin/Medieval Market Stalls/Demo.unity</code>.


[[File:Eco - Unity - View Modes.png|thumb|Underlined in red are the different draw mode buttons. <u>4/20/26</u>]]
[[File:Eco - Unity - View Modes.png|thumb|Underlined in red are the different draw mode buttons. <u>4/20/26</u>]]

Revision as of 22:59, 20 April 2026

Introduction

Below is a guide on how to take an 3D asset from the Unity Store and make a working workbench in Eco. This includes:

  • Creating a recipe to craft the modded table
  • Creating recipes so the player can use the modded table to craft something
  • Using Blender to generate a modded icon (seen when holding it in inventory)
  • Using Blender to adjust the origin point of the model
  • How to setup all this in a Unity scene and package for Eco

Setup

  • Already have setup ModKit + Unity
  • Have a 3D model
    • Just following along? Find the one used here at https://assetstore.unity.com/packages/3d/props/low-poly-medieval-market-stalls-314286
  • A C# IDE (notepad++, Visual Studio, etc.)
    • Highly encouraged to have an Intellisense setup and linked to the Reference Assemblies. Optional, but its really worth the time to figure out because it will help quickly correct small typos and trivial mistakes.
    • See: Getting Started with Eco Modding in Visual Studio 2022 (generally the same steps apply if using a new version of Visual Studio)
  • Blender installed
    • Homepage: https://www.blender.org/

Importing the Assets

  1. Open the Unity editor to the project.
  2. From the top toolbar open the Window drop down.
  3. Hover Package Management to open sub-menu.
  4. Select Package Manager.
  5. The Package Manager window will pop-up.
  6. Install the package containing the assets you want to use...
    1. If not using Unity Registry...
      1. Find the +▾ button in the top left and open the drop down.
      2. Install the package from one of those options.
    2. If using Unity Registry...
      1. Visit https://assetstore.unity.com and sign in.
      2. Search for the asset desired.
      3. Go to it's page (e.g. https://assetstore.unity.com/packages/3d/props/low-poly-medieval-market-stalls-314286) and click the big blue button, Add to My Assets.
      4. Now, in the Unity editor and back at the Package Manager window.
      5. Find My Assets on the left menu and navigate to it.
      6. Click the button in the lower-right.
      7. The asset should be in the list now. Use the search to filter if needed.
      8. Click on the asset in the list. For those following along, Low Poly Medieval Market Stalls.
      9. In the right panel, find the Download ⤓ button. Click it.
      10. Once downloaded, a new button should show up, it'll say something like ⊕ Import 1.0 to project . Click it.
      11. The Import Unity Package window will pop-up.
      12. Select Import on it.
  7. Verify you can find your assets from the explorer. If following along, the assets are at Assets/PolyRonin/Medieval Market Stalls.
  8. Load in a demo scene, if provided, and make sure everything looks okay.
    1. For those following along, double click on the Demo scene at Assets/PolyRonin/Medieval Market Stalls/Demo.unity.
Underlined in red are the different draw mode buttons. 4/20/26

If something seems off, check the different draw modes and see if changing those allow the scene to render as expected (see picture).

With all that setup, it's time to get to the creation parts.

Creating The Worktable

This guide will create the worktable in this order:

  1. Create the item that represents the worktable
  2. Make a recipe to craft the worktable item
  3. Make the worktable item something that places a world object
  4. Give the worktable functionality by adding recipes to it

Creating the Item

Item Icon

Rehash old guide from https://mod.io/g/eco/r/origin-points-icon-images-with-blender

Adding to Unity Scene

Follow steps in Unity Assets/EcoModKit/Docs/README.md

Fill in the gaps with https://www.youtube.com/watch?v=-4JcxeB27jU&list=PLlDdwsO1CKN7OJgfQOmwzoULoBqHUqxBm&index=7

Scripting the Item

Barebones code that registers the item + standard features (weight, ecopedia page, etc.).

Checkpoint

Export, run local, try /give myItem

Code the Item's Recipe

Time for an easy one, add a block of code to tell the game how to craft the worktable item. Assign to an existing worktable.

Talk about how the Item name in Unity and the class name in code is what joins the items. Must be exactly the same!

Checkpoint

Export, run local, try to craft the item

Create the World Object

Add to Unity Scene

Same as Creating the Item, Add to Unity Scene.

Explore what the ModKit utility World Object Setup does. In Unity editor, top toolbar, Eco Tools > Mod Kit > World Object Setup

Scripting the World Object

Barebones code that registers the world object.

Code that links the Item to this World Object.

Checkpoint

Export and see what it does. Ensure it's not lifting off the ground because of a non-curved shader.

Origin Point Editing

Talk about what it does: the point that the simulation considers this world object to be at.

Show how to move it around using blender.

Final Export

Export.

Package.

Distribute.