Object Assignment
Managing child objects in the grid layout
Object Assignment
The NSliceLayoutGroup allows you to assign child game objects to specific tiles in your grid layout using multiple methods.
Drag & Drop from Hierarchy
Single Object Assignment
- Select a child game object in the Hierarchy window
- Drag it onto a tile in the Inspector (NSliceLayoutGroup component)
- The object will be assigned to that specific tile
- The tile will turn green to indicate it contains an assigned object
Multiple Tile Assignment
- Hold Shift while dragging across multiple tiles in the Inspector
- Release to select multiple tiles
- Choose a child object from the selection prompt
- The selected object will be assigned to all selected tiles
Moving Assigned Objects
Tile-to-Tile Movement
Once an object is assigned to a tile (green tile):
- Drag the green tile in the Inspector
- Drop it onto an empty tile
- The object assignment will move to the new location
- The original tile becomes empty, and the target tile turns green
Visual Feedback
- Green Tiles: Contain assigned game objects
- Empty Tiles: Available for new assignments
- During Drag: Visual indicators show valid drop targets
Assignment Rules
- Each tile can contain one game object assignment
- The same game object can be assigned to multiple tiles
- Objects maintain their hierarchy relationship
- Assignments are preserved when the layout is saved
Managing Assignments
- View Assignments: Green tiles show which tiles have objects
- Clear Assignments: Use Quick Actions to clear assignments
- Bulk Operations: Use Quick Actions for efficient management