Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

NativeQuadtree

> 编程语言
Open source

A Quadtree Native Collection for Unity DOTS

388 stars0 likes0 views
WebsiteGitHub

About

A Quadtree Native Collection for Unity DOTS

NativeQuadtree

A Quadtree Native Collection for Unity DOTS. Octree version is here: https://github.com/marijnz/NativeOctree

Implementation

  • It's a DOTS native container, meaning it's handling its own unmanaged memory and can be passed into jobs!
  • It currently only supports the storing of points
  • The bulk insertion is using morton codes. This allows very fast bulk insertion but causes an increasing (minor) overhead with an increased depth

Performance

There's some very rudimentary performance tests included. With 20k elements on a 2k by 2k map, a max depth of 6 and 16 max elements per leaf. Burst enabled, ran on main thread on my 2015 MacBook Pro:

  • Job: Bulk insertion of all elements - Takes ~1ms
  • Job: 1k queries on a 200m by 200m range - Takes ~1ms

With Burst disabled the tests are about 10x slower.

Stability

The only tests test for performance so there's no real test coverage. I'm sure there's edge cases that are not caught. I would highly recommend writing more tests if you're planning to use the code in production.

Potential future work / missing features

  • Unit tests
  • Support for basic shapes
  • Other types of queries, such as raycasts
  • Support individual adding and removing of elements

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言