Skip to content

Functionality for drawing zones such as rooms on a grid in Unity 3D. Sample project included.

Notifications You must be signed in to change notification settings

codehunt023/unity3d-zoning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Area Designation / Zoning in Unity3D

About

This project shows a method of designating unique zones in a Unity3D project, such as rooms. It was inspired by games such as Prison Architect, where the player designates areas in the in game map for different tasks.

This approach uses a union find data structure to group areas that make contact with each other. Each distinct area is uniquely identifiable (shown in the sample project by a unique colour), and points can be tested to see which (if any) area they are contained by.

Features include

  • Drawing zones
  • Deleting zones
  • Preventing overlap of zones
  • Zone touch/overlap detection based purely on position (no pesky colliders or physics required)
  • Preventing zones being treated as touching when only their corners are contacting each other
  • Counting total area filled by zones
  • Counting distinct zones

Resources

Screenshots

About

Functionality for drawing zones such as rooms on a grid in Unity 3D. Sample project included.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 89.0%
  • HLSL 7.9%
  • ShaderLab 3.1%