Onity

Onity is a Unity-first framework for dependency injection, async gameplay flows, reactive state, typed messaging, factories, and pooling. Its core is engine-free, and the package has no non-Unity third-party runtime dependencies.

Current release: v0.3.6 · Unity: 2022.3 LTS or newer

Install

In Unity, open Window → Package Manager → + → Add package from git URL… and use:

https://github.com/furkantokkan/Onity.git#upm

To pin the current release:

https://github.com/furkantokkan/Onity.git?path=Packages/com.onity.framework#v0.3.6

Start here

  • Getting Started — hands-on walkthrough wiring DI, reactive, and events in one scene.
  • Async with OnityTask — frame waits, cancellation, scene loading, web requests, and the pooled-task safety rule.

What Onity provides

Area Main API
Dependency injection OnityContainer, installers, project/scene/game-object contexts
Async OnityTask, scene/web/AsyncOperation bridges, cancellation
Reactive state Subject<T>, ReactiveProperty<T>, synchronous and async operators
Messaging IMessageBroker, OnityEventHub, OnityEvent, keyed and async channels
Creation and reuse Typed factories, object/prefab pools, pool hooks

Performance snapshot

In the focused Windows IL2CPP singleton gate (Unity 2022.3.62f3, 1000 samples × 10,000 resolves), Onity standard measured 18.80 ns/op and VContainer measured 94.39 ns/op: approximately 80.1% lower resolve time in that run. Results are indicative, not a guarantee; see Performance & IL2CPP for the setup and caveats.

Guides

Reference

Migration

More