Skip to content

Resource Harvesting and Monster Spawners

Populating world scenes in Open MMORPG involves placing interactive resource nodes (trees, mining ores, herb bushes) and dynamic monster spawn areas that keep the world active.


The harvesting system allows characters to gather raw materials from world objects using equipped gathering tools.

  1. Right-click in the Project window and choose Create → Create GameData → Harvestable.
  2. Configure the resource node:
    • Title: Display name shown when aiming at the node (e.g., “Iron Ore Deposit”).
    • Max Hp: Hit points of the node before it breaks (e.g. 5 hits).
    • Require Weapon Types: Tool needed to harvest (e.g., Pickaxe or Wood Axe).
    • Items / Drop Table: Items awarded when harvested (e.g., Iron Ore, Rough Stone).
    • Respawn Delay: Duration in seconds before the depleted node respawns.

Step 2: Set Up the Harvestable Entity Prefab

Section titled “Step 2: Set Up the Harvestable Entity Prefab”
  1. Create a GameObject with a 3D model, mesh collider, and the HarvestableEntity component.
  2. Link your Harvestable game data asset to the entity.
  3. Configure Depleted Models: A visual model swapped in when the node is harvested (e.g., a tree stump or shattered rock).
  • Place individual HarvestableEntity prefabs directly in your map scenes, or
  • Use a Harvestable Spawn Area (HarvestableSpawnArea component) to automatically scatter resource nodes across a designated radius or terrain area.

Rather than placing individual static enemies across a map, monsters are managed dynamically by Monster Spawn Areas.

  1. In your map scene, create an empty GameObject where you want monsters to spawn.
  2. Add the MonsterSpawnArea component.
  3. Configure the spawner:
FieldDescription
Spawning DataList of Monster Character Entities to spawn, each with its relative spawn weight and level range.
Max AmountMaximum number of living monsters allowed from this spawner at any time.
Respawn DelaySeconds to wait after a monster dies before spawning a replacement.
Spawn RadiusCircular radius around the spawner center where monsters randomly appear.

NavMesh Positioning: Ensure your monster spawn area overlaps a baked Unity NavMesh so ground enemies spawn at valid walkable coordinates.