Skip to content

Commit fdccc8b

Browse files
committed
Update some documentation.
1 parent be6ca53 commit fdccc8b

2 files changed

Lines changed: 45 additions & 11 deletions

File tree

README.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you are looking for a full rewrite of the Unity integration, try [flutter_emb
1414
* Plugin versions `6000.x.y` support Unity 6 and up.
1515

1616

17-
This plugin works with the same [unitypackages](https://github.com/juicycleff/flutter-unity-view-widget/tree/master/unitypackages) as the original plugin.
17+
This plugin works with the same [unitypackages](https://github.com/timbotimbo/flutter-unity-view-widget/tree/flutter_unity_widget_2/unitypackages) as the original plugin.
1818

1919
<br />
2020

@@ -23,6 +23,38 @@ 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+
Make sure to import a new unitypackage of version 6000.x.y.
30+
31+
### Android
32+
In short:
33+
1. Follow the regular android setup like in the readme.
34+
But for Android do **NOT** use `ndk.dir=` in `local.properties`.
35+
Use the `ndkVersion = "<ndk version number here>"` in build.gradle approach.
36+
37+
1. Your Flutter project will need to use Java 17 and gradle 8.x to match the versions used by Unity.
38+
39+
Try to match or exceed these gradle and AGP versions:
40+
41+
| Unity Version | Gradle Version | Android Gradle Plug-in Version | NDK | JDK |
42+
|-----------------------------------|-----------------|--------------------------------|----------------------|-----|
43+
| 6000.2 - 6000.3+ | 8.13 | 8.10.0 | r27c (27.2.12479018) | 17 |
44+
| 6000.0.61f1+ | 8.13 | 8.10.0 | r27c (27.2.12479018) | 17 |
45+
| 6000.0.45f1 - 6000.0.60f1 | 8.11 | 8.7.2 | r27c (27.2.12479018) | 17 |
46+
| 6000.0.1f1 - 6000.0.44f1 | 8.4 | 8.3.0 | r27c (27.2.12479018) | 17 |
47+
| 2022.3.38f1+ | 7.5.1 | 7.4.2 | r23b (23.1.7779620) | 11 |
48+
| 2022.3.0f1 - 2022.3.37f1 | 7.2 | 7.1.2 | r23b (23.1.7779620) | 11 |
49+
50+
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.
51+
52+
53+
3. Make sure to import a 6000.0.x unitypackage into your Unity project. The export scripts have been updated.
54+
55+
2. Make sure to delete any old exports in `ios/UnityLibrary` and `android/unityLibrary` before making a new export.
56+
57+
2658

2759
## Migration from flutter_unity_widget
2860
I've tried to keep most internal classes identical, to keep migrating to the fork simple.
@@ -33,7 +65,7 @@ You just need to rename the plugin by adding `_2` in several files in your proje
3365
```diff
3466
dependencies:
3567
- flutter_unity_widget: ^2022.2.1
36-
+ flutter_unity_widget_2: ^2022.2.2
68+
+ flutter_unity_widget_2: ^2022.3.0 # use ^6000.1.0 for Unity 6.x
3769
```
3870

3971
2. Dart files in your Flutter project.
@@ -95,7 +127,8 @@ This plugin requires Flutter >= 3.16.0.
95127
First depend on the library by adding this to your packages `pubspec.yaml`:
96128
```yaml
97129
dependencies:
98-
flutter_unity_widget_2: ^2022.2.2 # use the latest compatible version
130+
flutter_unity_widget_2: ^2022.3.0 # use the latest compatible version
131+
# use ^6000.1.0 for Unity 6.x
99132
```
100133

101134
Now inside your Dart code you can import it.
@@ -127,8 +160,9 @@ the platform name (Android or iOS). You can click on its icon to expand it.
127160

128161
- An existing Unity project (if there is none, you can [create a new one](https://learn.unity.com/tutorial/create-your-first-unity-project)).
129162

130-
- A `fuw-XXXX.unitypackage` file, found in the [*unitypackages*](https://github.com/juicycleff/flutter-unity-view-widget/tree/master/unitypackages) folder.
163+
- A `fuw-XXXX.unitypackage` file, found in the [*unitypackages*](https://github.com/timbotimbo/flutter-unity-view-widget/tree/flutter_unity_widget_2/unitypackages) folder.
131164
Try to use the most recent unitypackage available.
165+
Alternatively, you can install the unitypackage using the Unity package manager.
132166

133167
### Unity versions for publishing
134168
If you want to publish your app for Android or iOS, you need to satisfy certain Unity version requirements.
@@ -139,13 +173,13 @@ Apple's [privacy manifest requirements](https://discussions.unity.com/t/apple-pr
139173
* 2022.3.18+
140174
* 6000.0.0+
141175

142-
**Android**
143-
> Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes.
144176

145-
This requires [Unity versions](https://discussions.unity.com/t/info-unity-engine-support-for-16-kb-memory-page-sizes-android-15/1589588):
146-
* 2021.3.48+ (Enterprise and Industry only)
147-
* 2022.3.56+
148-
* 6000.0.38+
177+
**Android**
178+
Due to a [security advisory](https://unity.com/security/sept-2025-01) the minimal Unity versions are:
179+
* 2021.3.56f2+
180+
* 2022.3.67f2+
181+
* 6000.0.58f2+
182+
* 6000.2.6f2
149183

150184

151185
### Unity project setup

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2022.3.0+1
66
# - Thomas Stockx <thomas@stockxit.com>
77
# - Kris Pypen <kris.pypen@gmail.com>
88
repository: https://github.com/timbotimbo/flutter-unity-view-widget
9-
issue_tracker: https://github.com/juicycleff/flutter-unity-view-widget/issues
9+
issue_tracker: https://github.com/timbotimbo/flutter-unity-view-widget/issues
1010

1111
environment:
1212
sdk: ">=3.2.0 <4.0.0"

0 commit comments

Comments
 (0)