@@ -39,13 +39,13 @@ This plugin requires Flutter >= 3.3.0
3939First depend on the library by adding this to your packages ` pubspec.yaml ` :
4040``` yaml
4141dependencies :
42- flutter_unity_widget : ^2022.2.1 # use the latest compatible version
42+ flutter_unity_widget_2 : ^2022.2.2 # use the latest compatible version
4343` ` `
4444
4545Now inside your Dart code you can import it.
4646
4747` ` ` dart
48- import 'package:flutter_unity_widget /flutter_unity_widget.dart';
48+ import 'package:flutter_unity_widget_2 /flutter_unity_widget.dart';
4949```
5050
5151You will need to open and export a Unity project, even for running the example. Your build will fail if you only include the widget in Flutter!
@@ -180,17 +180,16 @@ Check the **Minimum API Level** setting in the Unity player settings, and match
180180The Unity widget will function without this step, but some Unity plugins like ArFoundation will throw ` mUnityPlayer ` errors on newer Unity versions.
181181
182182 This is needed for Unity 2020.3.46+, 2021.3.19 - 2021.3.20 and 2022.2.4 - 2022.3.18.
183- This requires a flutter_unity_widget version that is newer than 2022.2.1.
184183
185184
186185- 3.1. Open the ` android/app/build.gradle ` file and add the following:
187186
188187``` diff
189188 dependencies {
190189 // build.gradle
191- + implementation project(':flutter_unity_widget ')
190+ + implementation project(':flutter_unity_widget_2 ')
192191 // build.gradle.kts (Flutter 3.29+)
193- + implementation(project(":flutter_unity_widget "))
192+ + implementation(project(":flutter_unity_widget_2 "))
194193 }
195194```
196195- 3.2. Edit your android MainActivity file.
@@ -342,7 +341,7 @@ allprojects {
342341``` diff
343342 import UIKit
344343 import Flutter
345- + import flutter_unity_widget
344+ + import flutter_unity_widget_2
346345
347346 @UIApplicationMain
348347 @objc class AppDelegate: FlutterAppDelegate {
@@ -360,7 +359,7 @@ allprojects {
360359
361360 3.2. If you're using Objective-C, open the * ios/Runner/main.m* file and change the following:
362361``` diff
363- + #import "flutter_unity_widget .swift.h"
362+ + #import "flutter_unity_widget_2 .swift.h"
364363
365364 int main(int argc, char * argv[]) {
366365 @autoreleasepool {
@@ -590,7 +589,7 @@ If you computer does not have an ARM processor, like most computers running on I
590589
591590``` dart
592591import 'package:flutter/material.dart';
593- import 'package:flutter_unity_widget /flutter_unity_widget.dart';
592+ import 'package:flutter_unity_widget_2 /flutter_unity_widget.dart';
594593
595594void main() {
596595 runApp(
@@ -647,7 +646,7 @@ class _UnityDemoScreenState extends State<UnityDemoScreen> {
647646
648647``` dart
649648import 'package:flutter/material.dart';
650- import 'package:flutter_unity_widget /flutter_unity_widget.dart';
649+ import 'package:flutter_unity_widget_2 /flutter_unity_widget.dart';
651650
652651void main() => runApp(const MyApp());
653652
0 commit comments