Skip to content

Commit 2555ee9

Browse files
committed
Readme adjustments for Unity 6.
1 parent a74e596 commit 2555ee9

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ This plugin works with the same [unitypackages](https://github.com/juicycleff/fl
2323
For now, most of the original readme is included below for documentation.
2424
I might expand on this later.
2525

26+
## Migration from Unity 2022 to Unity 6.
27+
The 6000 version is currently based on a 6000 branch in the original repo. See [this issue](https://github.com/juicycleff/flutter-unity-view-widget/issues/967) for more details.
28+
29+
In short:
30+
1. Follow the regular android setup like in the readme.
31+
But for Android ignore setting `ndk.dir=` in `local.properties`.
32+
Use the `ndkVersion = "<ndk version number here>"` in build.gradle approach.
33+
34+
1. Your Flutter project will need to use Java 17 and gradle 8.x to match the versions used by Unity.
35+
36+
Try to match or exceed these gradle and AGP versions:
37+
38+
| Unity Version | Gradle Version | Android Gradle Plug-in Version | NDK | JDK |
39+
|-----------------------------------|-----------------|--------------------------------|----------------------|-----|
40+
| 6000.0.45f1+ | 8.11 | 8.7.2 | r27c (27.2.12479018) | 17 |
41+
| 6000.0.1f1 - 6000.0.44f1 | 8.4 | 8.3.0 | r27c (27.2.12479018) | 17 |
42+
43+
Check [the Unity documentation](https://docs.unity3d.com/6000.0/Documentation/Manual/android-gradle-version-compatibility.html) for any updates. You can change the editor version in the top left.
44+
45+
46+
3. Make sure to import a 6000.0.x unitypackage into your Unity project. The export scripts have been updated.
47+
48+
2. Make sure to delete any old exports in `ios/UnityLibrary` and `android/unityLibrary` before making a new export.
49+
50+
2651

2752
## Migration from flutter_unity_widget
2853
I've tried to keep most internal classes identical, to keep migrating to the fork simple.
@@ -33,7 +58,7 @@ You just need to rename the plugin by adding `_2` in several files in your proje
3358
```diff
3459
dependencies:
3560
- flutter_unity_widget: ^2022.2.1
36-
+ flutter_unity_widget_2: ^2022.2.2
61+
+ flutter_unity_widget_2: ^2022.2.2 # use ^6000.0.0 for Unity 6.x
3762
```
3863

3964
2. Dart files in your Flutter project.

0 commit comments

Comments
 (0)