Skip to content

Repository files navigation

GridForge icon

GridForge for Unity

BuildUnity 2022.3+APIDiscord

Scene authoring, inspectors, diagnostics, and samples for the deterministic GridForge voxel-world library.

Keep grid behavior in the engine-agnostic core. Use this package host where Unity owns the boundary: serialized configurations, scene-owned worlds, topology-aware gizmos, authored blockers, logging, and sample workflows.

Requires Unity 2022.3 or newer. Repository CI currently validates Unity 6000.5.0f1.

Choose one package

Install exactly one variant; they expose overlapping GridForge assemblies.

PackageUse it when
com.mrdav30.gridforgeYou want the Standard dependency chain with MemoryPack support.
com.mrdav30.gridforge.leanYou want the same Unity-facing API without the MemoryPack runtime dependency.

In Window → Package Manager, choose + → Install package from git URL… and use one pinned URL:

https://github.com/mrdav30/GridForge-Unity.git?path=/com.mrdav30.gridforge#v9.0.0
https://github.com/mrdav30/GridForge-Unity.git?path=/com.mrdav30.gridforge.lean#v9.0.0

On first import, the package adds the matching FixedMathSharp-Unity and SwiftCollections-Unity dependencies, then asks Unity Package Manager to resolve again. If that process was interrupted, use Tools → GridForge → Repair Dependencies or the matching GridForge.Lean menu.

Build your first scene

  1. Add GridWorldComponent to the GameObject that owns the runtime world.

  2. Add GridConfigurationSaver and author a rectangular or hex, dense or sparse configuration.

  3. From a small bootstrap MonoBehaviour, apply the saved configurations after the world component initializes:

    _configurationSaver.EarlyApply(_gridWorldComponent.RebuildWorld(_configurationSaver.SpatialGridCellSize));

    The getting-started guide includes the complete component.

  4. Import the package sample named Demo Scene to explore the complete setup.

  5. Add GridDebugger, GridTraceVisualizer, or blocker components when you need scene visualization and authoring.

GridWorldComponent preserves the explicit ownership model from GridForge core. In a scene with multiple worlds, assign the intended component on each debugger, blocker, and trace tool.

What the adapter owns

  • Inspector-friendly rectangular, hex, dense, and sparse grid configuration
  • Direct FixedMathSharp field serialization through FixedMathSharp-Unity
  • Scene-owned GridWorld lifecycle
  • Transform-, collider-, renderer-, and manual-bounds blocker authoring
  • Physical-cell and sparse-hole diagnostic gizmos
  • Topology-aware trace visualization
  • Optional forwarding from GridForgeLogger into Unity logs
  • A Demo Scene covering the supported workflows

Learn more

The Standard and Lean package folders each own their manifest, asmdefs, embedded core DLL, install README, and serialized sample assets. Shared adapter source is maintained once under Build/Base and synchronized into both packages.

About

A high-performance, deterministic spatial grid management system for simulations and game development.

Topics

Resources

Contributing

Stars

18 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Contributors

Languages