Skip to content

Commit c884be0

Browse files
authored
Merge pull request #685 from juicycleff/feat/upgrade_flutter_3_3
feat: bumped to flutter 3.3.0
2 parents a1ab360 + 79fba14 commit c884be0

File tree

14 files changed

+34
-43
lines changed

14 files changed

+34
-43
lines changed

Diff for: .all-contributorsrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projectName": "flutter-unity-view-widget",
3-
"projectOwner": "snowballdigital",
3+
"projectOwner": "juicycleff",
44
"repoType": "github",
55
"repoHost": "https://github.com",
66
"files": [

Diff for: .github/workflows/main.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
- uses: subosito/flutter-action@v2
1313
with:
14-
flutter-version: '3.0.0'
14+
flutter-version: '3.3.0'
1515
channel: 'stable'
1616

1717
- name: Clean Dependencies

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2022.2.0
2+
3+
* Enable AndroidView due to native view improvement in flutter 3.3.0
4+
15
## 2022.1.7+1
26

37
* **BREAKING-CHANGE**:

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ First depend on the library by adding this to your packages `pubspec.yaml`:
3939
- Flutter 3.0.0
4040
```yaml
4141
dependencies:
42-
flutter_unity_widget: ^2022.1.1+3
42+
flutter_unity_widget: ^2022.2.0
4343
```
4444
4545

Diff for: example/lib/screens/simple_screen.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class _SimpleScreenState extends State<SimpleScreen> {
4646
onUnityCreated: _onUnityCreated,
4747
onUnityMessage: onUnityMessage,
4848
onUnitySceneLoaded: onUnitySceneLoaded,
49-
useAndroidViewSurface: true,
49+
useAndroidViewSurface: false,
5050
borderRadius: BorderRadius.all(Radius.circular(70)),
5151
),
5252
PointerInterceptor(

Diff for: example/unity/DemoApp/Assets/StreamingAssets.meta

-8
This file was deleted.

Diff for: example/unity/DemoApp/Packages/manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"dependencies": {
3-
"com.unity.collab-proxy": "1.15.18",
3+
"com.unity.collab-proxy": "1.17.1",
44
"com.unity.ext.nunit": "1.0.6",
5-
"com.unity.ide.rider": "3.0.14",
6-
"com.unity.ide.visualstudio": "2.0.15",
5+
"com.unity.ide.rider": "3.0.15",
6+
"com.unity.ide.visualstudio": "2.0.16",
77
"com.unity.ide.vscode": "1.2.5",
88
"com.unity.test-framework": "1.1.31",
99
"com.unity.textmeshpro": "3.0.6",

Diff for: example/unity/DemoApp/Packages/packages-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"com.unity.collab-proxy": {
4-
"version": "1.15.18",
4+
"version": "1.17.1",
55
"depth": 0,
66
"source": "registry",
77
"dependencies": {
@@ -24,7 +24,7 @@
2424
"url": "https://packages.unity.com"
2525
},
2626
"com.unity.ide.rider": {
27-
"version": "3.0.14",
27+
"version": "3.0.15",
2828
"depth": 0,
2929
"source": "registry",
3030
"dependencies": {
@@ -33,7 +33,7 @@
3333
"url": "https://packages.unity.com"
3434
},
3535
"com.unity.ide.visualstudio": {
36-
"version": "2.0.15",
36+
"version": "2.0.16",
3737
"depth": 0,
3838
"source": "registry",
3939
"dependencies": {
@@ -56,7 +56,7 @@
5656
"url": "https://packages.unity.com"
5757
},
5858
"com.unity.services.core": {
59-
"version": "1.4.0",
59+
"version": "1.4.2",
6060
"depth": 1,
6161
"source": "registry",
6262
"dependencies": {

Diff for: example/unity/DemoApp/ProjectSettings/ProjectSettings.asset

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ PlayerSettings:
139139
Others: 1
140140
bundleVersion: 0.1
141141
preloadedAssets:
142-
- {fileID: 4800000, guid: e7c77f6eaab324a819efdc13b8125a39, type: 3}
143-
- {fileID: -5691617579673776505, guid: 1356279c9d721447b97eebba41ddf775, type: 2}
142+
- {fileID: 4800000, guid: c9f956787b1d945e7b36e0516201fc76, type: 3}
143+
- {fileID: 673190512444688615, guid: 1356279c9d721447b97eebba41ddf775, type: 2}
144144
metroInputSource: 0
145145
wsaTransparentSwapchain: 0
146146
m_HolographicPauseOnTrackingLoss: 1
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 2022.1.7f1
2-
m_EditorVersionWithRevision: 2022.1.7f1 (240f4c1f462c)
1+
m_EditorVersion: 2022.1.13f1
2+
m_EditorVersionWithRevision: 2022.1.13f1 (22856944e6d2)

Diff for: ios/Classes/UnityPlayerUtils.swift

-2
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,13 @@ var sharedApplication: UIApplication?
251251
/// the controller handler methods
252252
@objc
253253
func unityMessageHandlers(_ message: UnsafePointer<Int8>?) {
254-
255254
for c in globalControllers {
256255
if let strMsg = message {
257256
c.handleMessage(message: String(utf8String: strMsg) ?? "")
258257
} else {
259258
c.handleMessage(message: "")
260259
}
261260
}
262-
263261
}
264262

265263
func unitySceneLoadedHandlers(name: UnsafePointer<Int8>?, buildIndex: UnsafePointer<Int32>?, isLoaded: UnsafePointer<Bool>?, isValid: UnsafePointer<Bool>?) {

Diff for: lib/src/io/device_method.dart

+11-12
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,17 @@ class MethodChannelUnityWidget extends UnityWidgetPlatform {
169169
}
170170

171171
if (defaultTargetPlatform == TargetPlatform.android) {
172-
// commented for 3.0.0 changes in platform view rendition
173-
// if (!useAndroidViewSurface) {
174-
// return AndroidView(
175-
// viewType: _viewType,
176-
// onPlatformViewCreated: onPlatformViewCreated,
177-
// gestureRecognizers: gestureRecognizers,
178-
// creationParams: creationParams,
179-
// creationParamsCodec: const StandardMessageCodec(),
180-
// hitTestBehavior: PlatformViewHitTestBehavior.opaque,
181-
// layoutDirection: TextDirection.ltr,
182-
// );
183-
// }
172+
if (!useAndroidViewSurface) {
173+
return AndroidView(
174+
viewType: _viewType,
175+
onPlatformViewCreated: onPlatformViewCreated,
176+
gestureRecognizers: gestureRecognizers,
177+
creationParams: creationParams,
178+
creationParamsCodec: const StandardMessageCodec(),
179+
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
180+
layoutDirection: TextDirection.ltr,
181+
);
182+
}
184183

185184
return PlatformViewLink(
186185
viewType: _viewType,

Diff for: pubspec.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_unity_widget
22
description: Flutter Unity 3D widget for embedding Unity game scenes in flutter. This library now supports Unity as a Library.
3-
version: 2022.1.7+1
3+
version: 2022.2.0
44
#authors:
55
# - Rex Raphael <rex.raphael@outlook.com>
66
# - Thomas Stockx <thomas@stockxit.com>
@@ -9,7 +9,7 @@ homepage: https://github.com/juicycleff/flutter-unity-view-widget/tree/master
99

1010
environment:
1111
sdk: ">=2.16.0 <3.0.0"
12-
flutter: ">=3.0.0"
12+
flutter: ">=3.3.0"
1313

1414
dependencies:
1515
flutter:
@@ -19,9 +19,8 @@ dependencies:
1919
flutter_plugin_android_lifecycle: ^2.0.7
2020
stream_transform: ^2.0.0
2121
plugin_platform_interface: ^2.1.2
22-
webview_flutter: ^2.8.0
2322
webviewx: ^0.2.1
24-
ffi: ^1.2.1
23+
# ffi: ^1.2.1 // required for windows support
2524

2625
dev_dependencies:
2726
flutter_test:

Diff for: test/flutter_unity_widget_test.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ Future<void> main() async {
7979
),
8080
);
8181

82-
expect(find.byType(PlatformViewLink), findsOneWidget);
83-
// expect(find.byType(AndroidView), findsOneWidget);
82+
expect(find.byType(AndroidView), findsOneWidget);
8483
expect(find.byType(UnityWidget), findsOneWidget);
8584
},
8685
);

0 commit comments

Comments
 (0)