Git Product home page Git Product logo

augmented-reality-developers / flutter-unity-arfoundation-echoar-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from echo3dco/flutter-unity-arfoundation-echo3d-example

0.0 1.0 0.0 262 KB

Example Flutter project with an embedded Unity project with AR Foundation and echoAR Integrated

Home Page: https://www.echoAR.xyz

License: Other

Kotlin 2.53% Swift 7.64% Objective-C 0.72% Dart 89.11%

flutter-unity-arfoundation-echoar-example's Introduction

Unity-Flutter-echoAR-example

Starter project to build Android apps using Flutter & Unity with echoAR

Register

Make sure you have an echoAR API key. If you don't have one yet, register for FREE at echoAR.

Setup

Unity project build settings

Android

  • Open the Build Settings window by clicking File > Build Settings....
  • Select Android and click Switch Platform.
  • Check Export Project
  • Open the Player Settings window by clicking Player Settings...
  • Configure the folowing:
    • Other Settings > Rendering > Graphics APIs: OpenGLES3
    • Other Settings > Configuration > Scripting Backends: IL2CPP
    • Other Settings > Configuration > Target Architectures: โœ” ARMv7, โœ” ARM64
  • Notice what is your Minimum API Level. You may need it later.
  • Close the Player Settings window
  • Click Add Open Scenes
  • Click Export and save as unityExport

iOS

  • Open the Build Settings window by clicking File > Build Settings....
  • Select iOS and click Switch Platform.
  • Click Add Open Scenes
  • Click Export and save as unityProject

Flutter configuration

  • Import the project dependecies by running flutter pub get from your terminal

Android

  • Copy your unityExport folder to <your_flutter_project>/android/unityExport
  • Run flutter pub run flutter_unity:unity_export_transmogrify in your terminal
  • Open <your_flutter_project>/android/app/build.gradle and make sure your project minSdkVersion equals to the one you defined for your Unity Project as Minimum API Level.
  • Open <your_flutter_project>/android/build.gradle and, inside allprojects { repositories {} }, add the following:
    flatDir {
        dirs "${project(':unityExport').projectDir}/libs"
    }
    
    so it will look something like this:
            allprojects {
        repositories {
            google()
            jcenter()
            flatDir {
                dirs "${project(':unityExport').projectDir}/libs"
                    }
                }
            }
    
  • Open <your_flutter_project>/android/settings.gradle and add the following at the end of the file:include ':unityExport'

iOS

  • Copy your UnityProject folder to <your_flutter_project>/iOS/UnityProject
  • Open <your_flutter_project>/iOS/Runner.xcworkspace in Xcode
  • Go to File > Add Files to "Runner", and add <your_flutter_project>/ios/UnityProject/Unity-iPhone.xcodeproj
  • Select Unity-iPhone/Data, and, in the Inspectors pane, set the Target Membership to UnityFramework
  • Select Unity-iPhone, select PROJECT : Unity-iPhone, and, in the Build Settings tab, configure the following:
    • Build Options > Enable Bitcode: No
    • Linking > Other Linker Flags: -Wl,-U,_FlutterUnityPluginOnMessage
  • Select Runner, select TARGETS : Runner, and, in the General tab, configure the following:
    • Frameworks, Libraries, and Embedded Content: UnityFramework.framework -> Embed & Sign
  • Open Runner/Runner/Info.plist, and configure the following:
Key Type Value
io.flutter.embedded_views_preview Boolean YES

Run

  • Open your main.dart file
  • Find and replace the value <YOUR-PROJECT-KEY> with your API key and uncomment the code line
  • Find and replace the value <YOUR-ENTRY-ID> with your model's entry ID and uncomment the code line
  • Save the file and run the project on an andorid phone

Learn more

Refer to our documentation to learn more about how to use Unity and echoAR.

This project uses a third part library.

Support

Feel free to reach out at [email protected] or join our support channel on Slack.

Screenshots

Flutter with Unity scene screenshot echoAR console screenshot

flutter-unity-arfoundation-echoar-example's People

Contributors

echo3dco avatar alon-grinshpoon avatar bpedazur avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.