Skip to content
CAI
Software that uses CAICheck a score

juicycleff/flutter-unity-view-widget

68.2

Adequate · 23 September 2026

5.1k

lines of production code

Dart

with C#, Kotlin, Swift

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a cross-platform Flutter plugin that embeds and controls Unity players within Flutter applications. It provides a unified API for initializing, pausing, and unloading Unity instances, while enabling bidirectional communication between Flutter and Unity across iOS, Android, Windows, and Web platforms. The package includes native bridge implementations, platform-specific widget renderers, and a comprehensive example app demonstrating various integration scenarios.

How it got here

2021 — Cross-platform Unity integration

21 changes.

This period focused on establishing robust cross-platform communication between Flutter and Unity, introducing native iOS and Android bridges for bidirectional messaging. The work included building a comprehensive example application with multiple demo screens, adding build automation scripts, and implementing a typed event system for reliable state management.

2022–2024 — Cross-platform Unity widget implementation

7 changes.

This period focused on expanding the Flutter Unity Widget plugin to support Windows and web platforms, alongside a comprehensive refactoring of the core API. The work introduced new abstractions for managing the Unity player lifecycle and established platform-specific implementations for mobile, Windows, and web environments.

Features

Add Unity integration scripts and WebAssembly bindings for cross-platform communication

The Unity demo app now includes core C\# scripts (NativeAPI, UnityMessageManager, SingletonMonoBehaviour) and a JavaScript library (FlutterUnity.jslib) that enable bidirectional messaging between Flutter and Unity. The new NativeAPI class provides platform-specific bridges for Android, iOS, and WebGL, while the message manager handles structured JSON payloads and scene load events, ensuring reliable communication across all supported platforms.

example/unity/DemoApp/Assets/FlutterUnityIntegration · medium confidence

Add example app and documentation for the Unity widget

Added the example application directory containing a .gitignore, .metadata, README.md, and example.md. The example.md file provides a complete Dart code snippet demonstrating how to integrate the flutter\_unity\_widget, including setting up the UnityWidget, handling messages between Flutter and Unity, and managing scene loads. The .metadata file tracks Flutter project metadata for migration and tooling. This provides users with a ready-to-run example to understand the plugin's capabilities.

example · high confidence

Added AR Core and AR Kit XR configuration assets for the Unity demo app

The Unity demo app now includes the necessary XR (Extended Reality) configuration files to support augmented reality on iOS and Android platforms. Specifically, the change adds the XRGeneralSettings asset which configures loaders and providers for iPhone, Android, and Standalone targets. It also introduces specific settings and loader assets for both Google's AR Core (Android) and Apple's AR Kit (iOS) ecosystems, enabling the demo application to initialize and run AR experiences on these respective mobile platforms.

example/unity/DemoApp/Assets/XR · high confidence

Added Windows platform support for the Flutter Unity Widget plugin

Users can now run the Flutter Unity Widget on Windows. This change introduces the Windows-specific implementation of the plugin, including the C++ plugin code, CMake build configuration, and header files, enabling cross-platform compatibility alongside existing mobile and desktop targets.

windows · high confidence

Added example screens for Unity widget integration

Added new example screens (api, loader, no\_interaction, orientation, and simple) that demonstrate the Flutter Unity widget in various configurations, including pointer interception for UI overlays, orientation changes, and different widget states.

example/lib/screens · high confidence

Added iOS example project for Flutter Unity Widget

The iOS example application has been added to the repository, providing a complete, buildable Xcode project for the Flutter Unity Widget. This includes the Xcode project structure, build configurations, and asset catalogs. The example's \AppDelegate\ is configured to initialize the Unity framework via \InitUnityIntegrationWithOptions\ and register Flutter plugins, enabling the iOS platform to run the Flutter application with integrated Unity content.

example/ios · high confidence

Added iOS native integration for Flutter-Unity communication

Added iOS native code (NativeCallProxy) and associated Unity asset files to enable communication between Flutter and Unity on iOS. This includes the header and implementation files for the native bridge, along with the necessary .meta and .asset files for the Unity project structure.

(repo-wide) · high confidence

Introduce new Unity widget and controller abstractions

Added new \UnityWidget\ and \UnityWidgetController\ classes in \lib/src\. The \UnityWidget\ is a Flutter \StatefulWidget\ that manages the lifecycle of an embedded Unity player, exposing callbacks for creation, messages, scene loading, and unloading. The \UnityWidgetController\ defines the interface for controlling the Unity instance, including methods for pausing, resuming, posting messages, and managing the player's state. These files establish the core API for integrating Unity content within a Flutter application.

lib/src · high confidence

Introduce structured Unity event and type system

Added new helper files (events.dart, misc.dart, types.dart) that define a typed event system for Unity communication. This introduces a generic UnityEvent class and specific event types (UnitySceneLoadedEvent, UnityLoadedEvent, etc.) to replace previous ad-hoc messaging, while also providing the SceneLoaded data model and error handling for unknown Unity IDs.

lib/src/helpers · high confidence

Introduced new iOS native components for the Unity widget

Added new Swift and Objective-C files (FLTUnityOptionsSink, FLTUnityView, FLTUnityViewFactory, FLTUnityWidgetController, UnityPlayerUtils, and plugin entry points) to manage the Unity player lifecycle, handle method channels, and render the Unity view within Flutter. This establishes the core iOS implementation for the flutter\_unity\_widget plugin.

ios/Classes · high confidence

Introduced platform-specific Unity widget implementations for mobile and Windows

Added new files in lib/src/io to implement the Flutter Unity widget across platforms. The abstract \UnityWidgetPlatform\ interface and \MethodChannelUnityWidget\ implementation provide the core logic for managing Unity player lifecycle (init, pause, resume, unload) and event streams (onUnityMessage, onUnitySceneLoaded, etc.) via method channels. A \MobileUnityWidgetController\ bridges the Flutter widget state to the platform interface, handling stream subscriptions and method calls. The \UnityWidget\ stateful widget manages the creation ID and delegates to the platform instance. Platform-specific rendering is handled by \AndroidUnityWidgetFlutter\ (configuring \AndroidView\ or \AndroidViewSurface\) and a stub \WindowsUnityWidgetView\ for Windows support.

lib/src/io · high confidence

New build automation scripts for iOS, Android, and WebGL exports

The Flutter Unity Integration now includes new editor scripts (Build.cs, XCodePostBuild.cs, SweetShellHelper.cs) that automate the export and configuration of Unity builds for iOS, Android, and WebGL. For iOS, the new XCodePostBuild script automatically patches Unity's generated Xcode project to disable bitcode, set skip\_install, and modify native headers, addressing issues with iOS builds and distribution. For Android and WebGL, the new Build.cs script provides menu-driven export options that handle directory management and build configuration. These changes streamline the process of generating platform-specific builds from the Unity editor.

example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor · high confidence

New example app structure with navigation menu

The example application has been restructured to include a main entry point (main.dart) and a menu screen (menu\_screen.dart) that allows users to navigate to various demo screens, including simple, loader, orientation, API, and no-interaction Unity demos. This provides a clearer entry point and navigation flow for the example.

example/lib · high confidence

Updated Unity demo with new scene and script files

The Unity demo application in the Flutter-Unity integration example has been updated with new assets and scripts. A new \Canvas\_cool.prefab\ was added, containing UI elements like text and buttons. New C\# scripts were introduced: \GameManager\ handles web function calls to pause, resume, unload, and quit the Unity application; \Rotate\ manages object rotation and communicates with Flutter via \UnityMessageManager\; and \SceneLoader\ provides methods to load scenes and manage the Unity window lifecycle. Additionally, new Unity scenes (\NativeScene\, \SampleScene\, \scene\_2\) and an \EventSystem\ prefab were added to support the demo's functionality.

example/unity/DemoApp/Assets/FlutterUnityIntegration/Demo · high confidence

Behavioural changes

Added .gitignore and .vsconfig to Unity demo project

The Unity demo project now includes a .gitignore file that excludes common Unity build artifacts, logs, and generated files from version control, alongside a .vsconfig file that specifies the required Visual Studio workload (Microsoft.VisualStudio.Workload.ManagedGame) for proper IDE setup.

example/unity/DemoApp · high confidence

Added iOS privacy manifest

A new PrivacyInfo.xcprivacy file has been added to the iOS resources, establishing a privacy manifest for the app. This manifest declares that no data is being tracked or collected, and no restricted APIs are being accessed, which helps ensure compliance with Apple's App Store privacy requirements.

ios/Resources · high confidence

Added placeholder for web example directory

A .gitkeep file was added to the example/web directory, creating a placeholder to ensure the directory is tracked by version control.

example/web · low confidence

New web implementation for Unity widget using webview\_flutter\_web

The web platform implementation for the Unity widget has been rewritten to use the \webview\_flutter\_web\ package instead of the previous \webviewx\/\webview\_flutter\ dependencies. This new \lib/src/web\ module introduces a dedicated \UnityWidget\ and \WebUnityWidgetController\ that communicate via \MethodChannel\ and \postMessage\ events, enabling the Flutter app to interact with the Unity player embedded in a web view. The controller handles Unity lifecycle events (created, message, scene loaded, unloaded) and manages the web view's base path for loading the Unity library.

lib/src/web · medium confidence

Repository housekeeping and documentation updates

The repository has been updated with contributor attribution in .all-contributorsrc, a new CHANGELOG.md documenting version history, and a BSD 3-Clause LICENSE file. The README.md has been revised to reflect the project's evolution into the Game Framework and to provide updated setup instructions for Android, iOS, and Web platforms. Additionally, .gitignore has been updated to exclude Visual Studio Code settings and specific Unity library folders, while .gitattributes and .metadata have been added to manage binary files and track Flutter project state.

(repo-wide) · high confidence

Restored JsonDotNet support in the Unity demo app

The JsonDotNet library and its associated metadata files have been re-added to the Unity project's Assets/FlutterUnityIntegration/JsonDotNet directory. This includes the AOT, Standalone, and Windows assembly folders containing the Newtonsoft.Json.dll binaries and their corresponding XML documentation files, as well as the link.xml configuration. This change restores the ability to serialize and deserialize JSON data within the Unity environment, which is essential for the Flutter-Unity messaging integration.

example/unity/DemoApp/Assets/FlutterUnityIntegration/JsonDotNet · high confidence

Updated Android example project structure and configuration

The Android example project has been updated to use Flutter 3.24.5, with a regenerated project structure including updated Gradle and SDK versions. The change introduces a new \.gitignore\ file, standardizes the \AndroidManifest.xml\ files for debug, profile, and main builds, and updates the \MainActivity.kt\ to inherit from \FlutterUnityActivity\. Additionally, launch background and theme styles are added or refreshed to support the V2 Flutter embedding and proper dark mode handling.

example/android · high confidence

Updated Unity DemoApp project settings to version 2022.3.62

The Unity project configuration files in the DemoApp have been updated to target Unity version 2022.3.62. This update refreshes the project settings, including the PlayerSettings (application identifiers, build targets, and splash screen options), editor configurations, and various manager settings (Audio, Physics, Graphics, Input, etc.) to align with the new Unity editor version.

example/unity/DemoApp/ProjectSettings · high confidence

Updated Unity package documentation and release notes

The \unitypackages/README.md\ file was added to the repository, providing comprehensive documentation for the \flutter\_unity\_widget\ Unity packages. This new file details which package to select based on Unity version compatibility, outlines troubleshooting steps for common issues like NewtonSoft errors, and includes a detailed changelog for each package version, including fixes for Unity 6000.0 breaking changes, iOS and Android export improvements, and various bug fixes.

unitypackages · high confidence

Fixes

Android touch input and Unity plugin compatibility fixes

The Android plugin was refactored to fix touch input detection with Unity's new Input System by modifying MotionEvent device IDs, and added a FlutterUnityActivity class to expose the mUnityPlayer property, which is required for Unity plugins like ARFoundation to function correctly.

android · high confidence

Introduce conditional exports for Flutter Unity widget

The library now uses conditional exports to serve different implementations for the Flutter Unity widget depending on the platform: it exports the IO-based implementation for native environments and the JS-interop-based implementation for the web. This ensures that the correct widget and controller logic is used for each environment, preventing crashes and broken code on web and mobile platforms.

lib · medium confidence

Test coverage

Added unit tests for the Unity widget integration; Added widget test for the example app.

Dependencies

Updated example project to Flutter 3.24.5 and Android Gradle Plugin 8 compatibility

The example project's Android build configuration has been updated to use Android Gradle Plugin 8, which requires a \namespace\ in the \build.gradle\ files. The example project has been regenerated using Flutter 3.24.5, updating the Gradle wrapper, Kotlin version (1.8.22), and Java compatibility settings (JVM 11). Additionally, the main plugin's \pubspec.yaml\ has been updated to require Dart SDK \>=3.2.0 and Flutter \>=3.16.0, and the \flutter\_lints\ dependency has been updated to ^5.0.0.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 64 → 68 (+4.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 68 (new)
  • Architecture 100 → 86 (-14.1)
  • Maturity 61 → 62 (+1.1)
  • Readiness 50 → 66 (+16.8)
  • Security 85 → 97 (+12.1)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (8)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Further orphaned files (smaller)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .cs, .dart, .kt, .swift — churn × complexity hotspots could not be measured

New (31)

  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (13 lines × 5) (example/lib/screens/api_screen.dart)
  • Duplicated block (14 lines × 2) (example/lib/screens/no_interaction_screen.dart)
  • Duplicated block (15 lines × 4) (example/lib/screens/api_screen.dart)
  • Duplicated block (19 lines × 3) (example/lib/screens/loader_screen.dart)
  • Duplicated block (20 lines × 2) (example/lib/screens/loader_screen.dart)
  • Duplicated block (21 lines × 2) (example/lib/screens/loader_screen.dart)
  • Duplicated block (26 lines × 2) (example/lib/screens/loader_screen.dart)
  • Duplicated block (8 lines × 3) (example/lib/screens/api_screen.dart)
  • HackComment (ios/Classes/UnityPlayerUtils.swift)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Low cohesion: _ApiScreenState (LCOM4 4) (example/lib/screens/api_screen.dart)
  • Low cohesion: _NoInteractionScreenState (LCOM4 5) (example/lib/screens/no_interaction_screen.dart)
  • Low cohesion: _SimpleScreenState (LCOM4 4) (example/lib/screens/simple_screen.dart)
  • Medium: security finding (details withheld)
  • Members sharing a duplicated core (5 members, 50+ identical tokens) (example/lib/screens/api_screen.dart)
  • No dependency advisory monitoring
  • …and 11 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

juicycleff/flutter-unity-view-widget was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8de767fda7a1296f2de55b9af8e73a2bbfa53001 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.