-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental Unity 6 (6000) support for Android. #967
Comments
I'm getting this error when trying to build my flutter application with the export for Android:
Coming from this set of lines in the build.grade:
|
Just tried this again with Unity 6000.0.16 and Flutter 3.24.1. The example from this repo worked worked without modifications. Then I made a new project using Flutter create, and got your error. Matching the gradle, AGP and kotlin versions with the example got me past the error. Using the new gradle apply method used in the latest Flutter versions: gradle-wrapper.properties - distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip settings.gradle - id "com.android.application" version "7.3.0" apply false
- id "org.jetbrains.kotlin.android" version "1.7.10" apply false
+ id "com.android.application" version "8.3.0" apply false
+ id "org.jetbrains.kotlin.android" version "1.9.10" apply false |
Seems my reading comprehension was a bit off, thank you for your help, that did fix that issue, and now I have a whole new one, the build works, all the C++ compiles successfully, but I get this error during my build:
|
In Unity try |
@timbotimbo That did it! Thank you so much for your help, my application now compiles properly for both iOS and Android. Would it be best if I run into more issues to just reply to this issue, or should I make new issues for other things I run into in the 6000 branch? |
Hey @timbotimbo, Thanks so much for keeping this library alive! Based on the title 'for Android', does it mean the unity ios build output is unchanged - so unity 6 should work fine, or more like it that would require another PR to add IOS support? For context: This version works great for me on android. On IOS however I'm stuck with a white screen and no output logs in xcode as soon as I include the flutter unity widget as a dependency. (I also run into the The only way I could get it running on IOS so far was with a unity 2022 export + master branch. |
Description
Unity 2023.1 and 6 (6000.0) include breaking changes for the Android version of this plugin.
And given that 2023.3 turned into 6000, I decided to implement support for Unity 6000.
For a litte more info, see the PR #966
Installing & testing
This alpha version is now live in the experimental/unity_6000 branch.
You can either download it and include the plugin using a relative path
or include it using the git url
Setup
Your Flutter project will need to use Java 17 and gradle 8.x,
Check the example project in the unity_6000 branch for the relevant build.gradle files.
Set the Unity
Application Entry Point
toActivity
.Player Settings -> Settings for Android -> Other Settings -> Application Entry Point
After the Unity export,
android/unityLibrary/build.gradle
might include a broken import.Assets/FlutterUnityIntegration/Editor/build.cs
file with the one from the example project.apply from: '../shared/keepUnitySymbols.gradle'
inunityLibrary/build.gradle
The text was updated successfully, but these errors were encountered: