Click on Import.Īfter importing, click on Flutter and select the Export Android Debug or Export Android Release option (will export to android/unityLibrary) or the Export iOS Debug or Export iOS Release Go to Assets > Import Package > Custom Package and select theįlutterUnityPackage.unitypackage file. Select the appropriate SDK on Target SDK depending on where you want to test or run your app (simulator or physical device).īe sure you have at least one scene added to your build. In Target Architectures, select ARMv7 and ARM64 Using Unity, open the Unity project, go to File > Build Settings > Player SettingsĪnd change the following under the Configuration section:.The expected path is unity/ project-name/FlutterUnityPackage.unitypackage Copy the FlutterUnityPackage.unitypackage file into the Unity project folder.The expected path is unity/ project-name/. Create a folder named unity and move the Unity project into there.That's it! You don't need to tell your Android App in your app/adle the NDK version or other NDK settings. You can find the path to the NDK under Preferences -> External Tools:Ĭopy the path by right click and paste the path here in your android/local.properties: ndk.dir=/Applications/Unity/Hub/Editor/2020.3.19f1/PlaybackEngines/AndroidPlayer/NDK Your android project needs to know the path of the NDK Unity uses. If your project requires Android NDK, you have to setup following: Remeber to always check the match unitypackage for your project. Prerequisites #Īn existing Flutter project (if there is none, you can create a new one)Īn existing Unity project (if there is none, you can create a new one).įile (you can access the Unity packages in the unitypackages folder too) In the tutorial below, there are steps specific to each platform, denoted by a ℹ️ icon followed by import 'package:flutter_unity_widget/flutter_unity_widget.dart' ģ0 fps gifs, showcasing communication between Flutter and Unity:įor this, there is also a video tutorial, which you can find a here. Now inside your Dart code you can import it. Pre Flutter 3.0.0 (This version will gradually be deprecated).Installation #įirst depend on the library by adding this to your packages pubspec.yaml: You can track this issue.Ĭurrently working on supporting AndroidView. You have to pass useAndroidViewSurface: true to UnityWidget. ^2022.1.0+5 supports Flutter 3.0.0 and can only work with PlatformViewSurface for now. Is not compatible with other versions, it just mean it's been tested to work with a unity version. Moving forward, versioning of the package will change to match unity releases after proper test. If you have issues with how unity widget is presented, you can please modify your unity project build settings as you seem fit. This plugin expects you to atleast know how to use Unity Engine. Need me to respond, tag me Rex Isaac Raphael.Īlways use the matching FUW unitypackage for the unity version your are using. Note: Please use OpenGLES3 as Graphics API only for now (Android only). UnityFramework does not support emulator. Note: Supports only Unity 2019.4.3 or later. There are now two unity app examples in the unity folder, one with the default scene and another based on Unity AR foundation samples. Works great on Android, iPad OS, iOS, Web, with Windows nearing completion. Now you can make awesome gamified features of your app in Unity and get it rendered in a Flutter app both in fullscreen and embeddable mode. Flutter unity 3D widget for embedding unity in flutter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |