unity_kit
Flutter plugin for Unity 3D integration — typed bridge, binary protocol, performance + AR, on Android, iOS, web & desktop.
2.0.3
19K downloads/mo
#2243 most downloaded on pub.dev
erykkruk/flutter_unity_kit
What this package is like to depend on
Last release 1 months ago
15 Jul 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
13 releases · first in 2026
13 releases in the last 12 months
see the full history below
Release timeline
13 releases · Feb 2026 to Jul 2026Releases
latest 13-
2.0.315 Jul 2026Release notes
Open source →- Maintenance release.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
2.0.210 Jul 2026Release notes
Open source →- pubspec: documentation link to codigee.com/open-source/unity-kit
- README (root + unity_kit): prominent Documentation section with all subpages
- CI: add ci.yml (format/analyze/test), replace auto-tag with release.yml (auto-bump)
- bump unity_kit to 2.0.2
Release notes
Open source →Docs
- Linked the full hosted documentation at
codigee.com/open-source/unity-kit
from
pubspec.yaml(documentation:) and added a prominent Documentation section to the README covering the step-by-step walkthrough, native setup (Android/iOS), Unity export, content loading, API reference, asset streaming, architecture, and FAQ.
-
2.0.109 Jul 2026Release notes
Open source →Native (iOS + Android) now emits onViewDisposed before tearing down a
platform view's method channel. The Dart bridge resets its readiness
guard back to initializing, so sendWhenReady() queues messages until
the next UnityView attaches instead of throwing MissingPluginException
on the dead com.unity_kit/unity_view_N channel.Also cancels the previous platform event subscription on re-initialize()
to prevent duplicated events after unload().Release notes
Open source →Fixed
MissingPluginExceptionafter the activeUnityViewis disposed (#4). When the platform view backing the activeUnityViewwas destroyed (e.g. the screen was popped), the Dart side kept targeting the deadcom.unity_kit/unity_view_Nchannel and the bridge stayedready, so the nextsend/sendWhenReadycrashed withMissingPluginException. Native (iOS + Android) now emits anonViewDisposednotification before tearing the channel down; the bridge resets readiness back toinitializing, sosendWhenReady()queues messages until the nextUnityViewattaches andsend()throws a typedEngineNotReadyExceptioninstead.- Duplicate platform events after re-
initialize(). CallingUnityBridgeImpl.initialize()again afterunload()subscribed to the platform event stream a second time, duplicating every message/event. The previous subscription is now cancelled first.
-
2.0.010 Jun 2026Release notes
Open source →- Binary protocol: UnityBinaryCodec + bridge.sendBinary/sendBinaryWhenReady,
UnityBinaryWriter/Reader; symmetric C# UnityKitBinaryCodec + FlutterBridge.ReceiveBinary - Performance monitoring: bridge.performanceStream + UnityPerformanceStats,
UnityKitPerformanceMonitor (FPS/frame time/memory) - AR Foundation: UnityConfig.ar() + UnityArMode; iOS/Android read arMode/sceneName
and forward __unitykit_init; UnityKitGameManager + UnityKitArSession consume it - Attribute dispatch: [UnityKitMethod] + MessageRouter.RegisterMethods
- Web (WebGL) plugin (UnityKitWeb, HtmlElementView/js_interop) + macOS/Windows/Linux scaffolding
- Editor project validator; asmdefs (runtime/editor/tests)
- Tests: Dart (binary/perf/AR + cross-language golden frame) + Unity EditMode; example app wired
- Docs: README overview/feature sections, doc/api.md Bridge & Messaging
BREAKING CHANGE: minimum SDK raised to Dart 3.4 / Flutter 3.22 (web js_interop);
UnityBridge gains sendBinary, sendBinaryWhenReady, performanceStream.Bump 1.1.1 -> 2.0.0
Release notes
Open source →Breaking
- Minimum SDK raised to Dart
3.4/ Flutter3.22(required by the moderndart:js_interopweb implementation). Existing mobile API usage is unchanged. UnityBridgegainedsendBinary,sendBinaryWhenReady, andperformanceStream. Code that calls the bridge is unaffected; only code that directlyimplements UnityBridge(e.g. custom mocks) must add the three members.UnityBridgeImpland the bundled mocks already do.
Added
- Binary protocol.
UnityBinaryCodeccompact wire format withUnityBridge.sendBinary()/sendBinaryWhenReady(), plusUnityBinaryWriter/UnityBinaryReaderfor hand-packed payloads. Mirrored on the Unity side byUnityKitBinaryCodec+FlutterBridge.ReceiveBinary. - Performance monitoring.
UnityBridge.performanceStreamemittingUnityPerformanceStats(FPS, frame time, used memory), produced by the newUnityKitPerformanceMonitorMonoBehaviour. - AR Foundation.
UnityConfig.ar()factory andUnityArMode(none/passthrough/overlay), wired to native creation params and a dependency-freeUnityKitArSessionbridge on the Unity side. - Attribute dispatch.
[UnityKitMethod]attribute +MessageRouter.RegisterMethods(target, instance)to expose C# methods to Flutter by name via reflection. - Game manager.
UnityKitGameManagerMonoBehaviour handling load/unload scene, target frame rate, and pause/resume from Flutter. - Web (WebGL) support.
UnityKitWebplugin registering thecom.unity_kit/unity_viewplatform view viaHtmlElementView, bridging through the per-view method channel. - Desktop scaffolding. macOS / Windows / Linux plugins register the method channel so the Dart bridge API is callable; embedded player view is WIP.
- Project validator. Editor menu
Tools ▸ UnityKit ▸ Validate Project. UnityConfig.toCreationParams()as the single source of truth for the Dart → native config contract (now also carriessceneNameandarMode).
Changed
UnityViewnow renders anHtmlElementViewon web.- iOS and Android now read
arMode/sceneNamefrom the view creation params:UnityArMode.overlayenables transparent rendering automatically, and both values are forwarded to Unity as a__unitykit_initmessage thatUnityKitGameManagerconsumes.
- Binary protocol: UnityBinaryCodec + bridge.sendBinary/sendBinaryWhenReady,
-
1.1.107 Jun 2026Release notes
Open source →Added
UnityConfig.embedded()factory for creating an embedded (non-fullscreen) Unity view configuration, mirroring the existingUnityConfig.fullscreen()factory. Optionally acceptstransparentBackground.
-
1.1.020 Apr 2026Release notes
Open source →Renders the native Unity container non-opaque on iOS so Flutter
widgets painted behind the platform view show through. Requires
the Unity camera's clear colour to use alpha 0.- UnityConfig.transparentBackground (default false) + fullscreen factory override
- iOS UnityKitView recursively applies isOpaque=false and clear bg to Unity view hierarchy
- Android: flag ignored, warning logged via UnityKitLogger (iOS-only for now)
- UnityConfig.toString() now reports every field for parity with ==/hashCode
- Tests: defaults, copyWith, equality, hashCode, toString, factory override
- Bump to 1.1.0, CHANGELOG updated, README usage section added
Release notes
Open source →Added
UnityConfig.transparentBackgroundflag that renders the native Unity container non-opaque on iOS so Flutter widgets painted behind the platform view can show through. Requires the Unity scene camera's clear colour to use alpha0.UnityConfig.fullscreen()factory now acceptstransparentBackground.- iOS
UnityKitViewrecursively appliesisOpaque = falseand a clear background to the Unity root view hierarchy when the flag is enabled.
Changed
UnityConfig.toString()now reports every field, includingtransparentBackground, so it stays in sync with==/hashCode.UnityViewlogs a warning viaUnityKitLoggerwhentransparentBackgroundis enabled on Android (iOS-only feature).
-
1.0.307 Apr 2026 -
1.0.207 Apr 2026Release notes
Open source →Changed
- Android
compileSdk: 34 → 35 androidx.lifecycle: 2.7.0 → 2.8.7androidx.annotation: 1.7.1 → 1.9.1
- Android
-
1.0.127 Mar 2026Release notes
Open source →- detachUnityView guards against removing view owned by another container
- restartRendering() wakes Unity render loop after view reattachment
- podspec drops File.symlink? to avoid CocoaPods ENOENT on dangling symlinks
- Dart platform calls use _activeViewId instead of hardcoded 0
- registerViewChannel(viewId) binds correct MethodChannel on PlatformView creation
Release notes
Open source →Fixed
- iOS: Unity view re-navigation —
detachUnityView()now checkssuperview === selfbefore removing, preventing race conditions when a new container has already claimed the Unity view. - iOS: Rendering restart — added
restartRendering()toUnityPlayerManagerthat callsshowUnityWindow()after view reattachment, ensuring AR subsystems (e.g. Vuforia) reinitialize properly. - iOS: CocoaPods dangling symlink — podspec no longer uses
File.symlink?which returnstruefor dangling symlinks, causing CocoaPodsrealpathto fail with ENOENT. - Dart: Active view channel routing — all platform method calls now use
_activeViewIdinstead of hardcoded0, ensuring correct MethodChannel routing after Flutter navigation creates new platform views. - Added
registerViewChannel(int viewId)toUnityKitPlatform— automatically called when a new platform view is created on both Android (Hybrid Composition) and iOS (UiKitView).
-
1.0.027 Mar 2026Release notes
Open source →Changed
- Stable release — API is now considered stable. Follows Semantic Versioning from this point.
_RoutedUnityMessagenow exposes logicalgameObject,method,type, anddataproperties matching the actual target (e.g.FlutterAddressablesManager), while routing throughFlutterBridge.ReceiveMessageat the native layer vianativeGameObject/nativeMethod.
Added
UnityMessage.nativeGameObjectandUnityMessage.nativeMethodgetters for accessing the nativeUnitySendMessagetarget separately from the logical message properties.UnityAssetLoader.loadContentCatalogMessage— request Unity to load a remote content catalog by URL (Addressables).- "Why Addressables?" section in README — explains how dynamic content delivery keeps app size ~100 MB instead of 500 MB+.
Fixed
- All 22 previously failing tests in
streaming/andloaders/now pass — routed messages correctly expose target info through standardUnityMessageproperties.
-
0.9.218 Mar 2026Release notes
Open source →Fixed
- Android display bug: Unity view no longer renders on top of all Flutter widgets, covering the entire screen regardless of layout bounds (#1).
- Switched Android rendering from Virtual Display (
AndroidView) to Hybrid Composition (PlatformViewLink+initExpensiveAndroidView) for correct z-ordering and bounds clipping. - Applied
setZOrderOnTop(false)on Unity'sSurfaceViewafter attachment. - Added delayed re-focus (500ms) to ensure rendering starts after Hybrid Composition finishes surface setup.
- Switched Android rendering from Virtual Display (
Documentation
- Added ARM64 export requirement to unity-export.md — exporting only ARMv7 causes Unity player to silently fail on arm64 devices.
- Added troubleshooting entry for "Unity view never loads on Android".
- Android display bug: Unity view no longer renders on top of all Flutter widgets, covering the entire screen regardless of layout bounds (#1).
-
0.9.119 Feb 2026Release notes
Open source →Fixed
- Fixed
.pubignoreexcludingmodels/directory from published package, causing 159 analysis errors on pub.dev. - Removed unused
connectivity_plusdependency.
- Fixed
-
0.9.019 Feb 2026Release notes
Open source →Added
- Gesture controls for
UnityView(gestureRecognizersparameter). - CocoaPods support for iOS integration.
- Target frame rate configuration (
UnityConfig.targetFrameRate). - Touch event handling for Android and iOS.
- Flutter Android lifecycle integration.
- Core bridge:
UnityBridge,UnityBridgeImplwith typed messaging. - Lifecycle management: 6-state machine (
uninitialized→ready→paused→resumed→disposed). - Readiness guard: auto-queue messages until Unity is ready.
- Message batching (~16ms windows, coalescing).
- Message throttling (3 strategies:
drop,keepLatest,keepFirst). - Asset streaming: manifest-based, SHA-256 integrity, caching.
- Content downloading with exponential backoff.
- Addressables and AssetBundle loaders.
UnityViewwidget with platform views (Android HybridComposition + iOS UiKitView).UnityPlaceholderloading widget.UnityLifecycleMixinfor app pause/resume handling.- Typed exception hierarchy (
UnityKitException,BridgeException,CommunicationException,LifecycleException,EngineNotReadyException). UnityConfig,UnityMessage,SceneInfomodels.- Platform abstraction via
MethodChannel. - C# Unity scripts (
FlutterBridge,MessageRouter,MessageBatcher,SceneTracker,NativeAPI,FlutterMonoBehaviour). - Comprehensive test suite (35 files, ~9000 lines).
- API documentation and asset streaming guide.
- Gesture controls for