Description
Description
Unity 2023.1 and 6 (6000.0) include breaking changes for the Android version of this plugin.
And given that 2023.3 turned into 6000, I decided to implement support for Unity 6000.
For a litte more info, see the PR #966
Installing & testing
This alpha version is now live in the experimental/unity_6000 branch.
You can either download it and include the plugin using a relative path
flutter_unity_widget:
path: <folder path>
or include it using the git url
flutter_unity_widget:
git:
url: https://github.com/juicycleff/flutter-unity-view-widget.git
ref: experimental/unity_6000 # branch name
Update
The branch now also includes a fuw-6000.0.1.unitypackage
.
Setup (android)
-
Follow the regular android setup like in the readme. But ignore setting
ndk.dir=
inlocal.properties
.
Use thendkVersion = "<ndk version number here>"
approach. -
Your Flutter project will need to use Java 17 and gradle 8.x to match the versions used by Unity.
Check the example project in the unity_6000 branch for the relevant build.gradle files.
Unity Version | Gradle Version | Android Gradle Plug-in Version | NDK | JDK |
---|---|---|---|---|
6000.0.45f1+ | 8.11 | 8.7.2 | r27c (27.2.12479018) | 17 |
6000.0.1f1 - 6000.0.44f1 | 8.4 | 8.3.0 | r27c (27.2.12479018) | 17 |
-
Update.
Use the 6000.0.x unitypackage or copy the latestunity/Assets/FlutterUnityIntegration/Editor
folder from the branch into your Unity project. -
Set the UnityApplication Entry Point
toActivity
.
Player Settings -> Settings for Android -> Other Settings -> Application Entry Point -
After the Unity export,android/unityLibrary/build.gradle
might include a broken import.Either fix this automatically by updating yourAssets/FlutterUnityIntegration/Editor/build.cs
file with the one from the example project.Or comment the 2nd lineapply from: '../shared/keepUnitySymbols.gradle'
inunityLibrary/build.gradle
Setup (ios)
There don't seem to be any breaking changes in the plugin for iOS.
You do need a small change in the Unity export.
Use the 6000.0.0 unitypackage or copy the latest unity/Assets/FlutterUnityIntegration/Editor
folder from the branch into your Unity project.