Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Grid Inventory System

A compact Unity 6 demonstration of a grid-based inventory system. This repository intentionally uses only code-generated UI and flat colors: there are no third-party or team art assets.

Highlights

  • 6 x 8 inventory grid
  • Multi-cell items (2 x 2, 2 x 1, and 1 x 1)
  • Drag to move
  • Invalid placements roll back automatically
  • Compatible overlapping items swap places when both fit
  • Small, self-contained codebase suitable for reading in an interview

Run

  1. Open the project with Unity 6000.3.9f1 (or a compatible Unity 6 version).
  2. Open Assets/Scenes/InventoryDemo.unity.
  3. Press Play.

Controls

Drag an item onto empty cells to move it. Drop a same-sized item over another same-sized item to swap them. Drop an item outside the grid or over an incompatible occupied area to see it return to its previous location.

Design notes

GridInventoryModel separates placement rules from presentation. A move first checks bounds and occupancy while ignoring the dragged item itself. If direct movement is invalid, it tests whether exactly one overlapping item can exchange positions. The GUI layer only converts pointer coordinates into grid cells and displays the result.

Attribution

Created as an independent portfolio demo. No assets, code, or configuration from the original team project are included.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages