flutter_unity 0.1.0
flutter_unity: ^0.1.0 copied to clipboard
A Flutter plugin for embedding Unity projects.
flutter_unity #
A Flutter plugin for embedding Unity projects. iOS is currently not supported.
Usage #
To use this plugin, add flutter_unity
as a dependency in your pubspec.yaml file.
Configuring your Unity project (Android) #
- Go to File > Build Settings... to open the Build Settings window.
- Select Android and click Switch Platform.
- Click Add Open Scenes
- Check Export Project
- Click Player Settings...
- In the settings window, configure the following:
Setting | Value |
---|---|
Other Settings > Rendering > Graphics APIs | OpenGLES3 |
Other Settings > Configuration > Scripting Backend | IL2CPP |
Other Settings > Configuration > Target Architectures | ARMv7, ARM64 |
- Close the settings window.
- Click Export and save as
unityExport
Configuring your Flutter project (Android) #
- Copy the
unityExport
folder to<your_flutter_project>/android/unityExport
- Run
flutter pub run flutter_unity:unity_export_transmogrify
- Open
<your_flutter_project>/android/build.gradle
and, underallprojects
>repositories
, add the following:
flatDir {
dirs "${project(':unityExport').projectDir}/libs"
}
- Open
<your_flutter_project>/android/settings.gradle
and add the following:
include ':unityExport'