This project aims to enable users to have AR experiences for iOS and for Android. This is made possible by the game engine Unity and its package: AR Foundation. To bring the AR experience from Unity to Flutter, the plugin "flutter_unity" from Glartek is used. In the example scene, the user can test an AR scene with an printed reference image which is an example of image tracking. Have fun
To setup this example, please follow these instructions in Unity and Android Studio. If you didn't download them yet, please download theme here for free:
Supported devices:
Unity Versions:
- Unity version build: 2019.4.25f1
- Unity version tested: 2019.4.25f1
Note: You can only test this example with an real mobile device. No simulator supported.
For Android create one in <flutter-project-root>/android/
and call it unityExport
.
For iOS create one in <flutter-project-root>/ios/
and call it UnityProject
.
2. Now open the example unity project in (<flutter-project-root>/unity/Flutter-Unity-ARFoundation-Example)
with Unity 2019.4.*^
3. Please print out the reference image in <unity-project-root>/Assets/
called please_print_me.png
so you have an reference image for image tracking.
File > Build Settings
- Select Android platform on the left and switch platform (if neccessary)
- Check "Export project" on the right sided checkbox
- Click Export and export the client to the previously created export folder in your flutter project
<flutter-project-root>/android/unityExport
Currently not supported due to unresolved bugs (still in development)
After exporting the files, open your downloaded flutter project in android studio and configure it as described in the following instructions.
Configuring your Flutter project (Android) from Glartek
Currently not supported due to unresolved bugs (still in development).
If you have any questions or problems, please post an issue or contact me at: martin.haferanke@gmail.com
- Solution:
- Try
flutter pub cache repair
- Type
flutter pub get
again
- Try
- Solution:
- Due to some bugs in xCode and Android Studio there is currently no support for iOS. Issues will still being created later.