Developing an Augmented Reality app for Android - android

We will be developing an Augmented Reality Android app for out project.
I've watched several tutorials on YouTube about AR, I see them use Unity, Vuforia, ARToolKit, OpenSpace3D, etc. I've also watched videos on how to use Android Studio in creating an android app.
When they create the AR scene they want on, for example, Unity & Vuforia, they export it to an Android device and then they run their project on the device. They did not need to use Android Studio for that. When they click on the app on the device, it automatically opens up the AR camera, ready to read the markers, and that's it.
The app that we are going to do has multiple features, one of those features is the AR Camera. I was wondering if there was a way to create a menu for our app, so that the user has the option to choose what to do.
I know that I can create menus in Android Studio, and I can create an AR scene in Unity. BUT I'm not sure if I can put the AR scene that I've made, into the menu I made in Android Studio. I do not know if it is possible. Maybe there is another way of doing this?
Thanks for taking the time to read.

In short: yes, you can do that. In this case all functionality will be based on Unity (including menu screens).
Workflow is roughly be as follows:
create menu scene(s) as needed in Unity
create AR scene based on Vuforia plugin
on user action in menu scene switch to AR scene
Then for production
switch output to desired platform (Windows, OS-X, Android, iOS)
generate output
In case of Android you can generate the complete APK ready for publishing through Google Play. No need for Android Studio.
Be warned that you will have some kind of a learning curve though if you haven't worked with Unity and Vuforia before.
Oh and you must obtain the right license(s) for your situation from both Unity and Vuforia.

Related

How can I push Unity games into my Android Studio app?

I am building an app that can host multiple games. The games will be made in Unity3D. For the app, I was torn between Unity3D and Android Studio. I am thinking of using Android Studio.
Can the desired task be done in Android Studio? Later on I also want to be able to load new games into the app from a Web Server, that's why I'm going with Android Studio
Although it is possible to export from Unity into an Android library, you can only have one instance of the UnityPlayer at a time. And it is not possible to restart that instance once you quit it. But I never tried to have multiple Unity projects in one Android Project, so it might still be kind of possible
Unity introduced native library support in 2019.3 (still in beta). Perhaps this will develop in your favour, but your requirements are a bit exotic.
Another approach could be to develop all games in one Unity-Project and then export scenes of a single game as AssetBundles. That would eliminate the need to handle multiple Unity-Projects but has downsides on his own.

Is it possible to embed a Unity game into a Flutter app?

I am creating an app that will require small mini-games as a menu option, and I have created these games in Unity. Ideally, I would like to embed these games into a Flutter project. I have seen tutorials on doing this with Java and Android Studio, and I need to make a decision on which platform I will be using for my internship project. I have several questions about the SDK, but I have posted them separately to keep the answers distinct (and help filter out the noise for anyone searching for these specific answers), and this is one of my main questions.
Specifically, I am following this guide: https://medium.com/#davidbeloosesky/embedded-unity-within-android-app-7061f4f473a
for Android Studio, and was wondering if something similar was possible with Flutter. I am also using Android Studio as my IDE for Flutter, but need to decide if I should stick with Java, or switch to Dart and Flutter (which actually works much better for specific UI elements I need).
If not, is there another way to package a Unity project and a Flutter application together?
You can imagine the whole Flutter app to be rendered on one view of the final native application. It can coexist with native views. So it should definitely be possible to display a native Android/iOS view with Unity content and trigger that from Flutter.
Create a Flutter project and open the Android native part of it (right click the android folder in Android Studio, choose Flutter -> Open Android module).
Create a native Android view there and use platform channels to display it.
Add Unity content to the native view.
https://flutter.io/platform-channels/
As of May 2022, I would like to share an updated information for mobile app developers who are researching this interesting issue. The reason I'm writing this answer is because there was so many development tasks that need to be done before I get the right answer to the above question. A developer researching this subject should work in both Unity, Android Studio and Xcode in order to find a definitive answer to his/her question, and should also know how to develop mobile apps with Flutter. Honestly, if everything had not gone well, my long time development works might have been wasted. In addition to my answer, I would like to give also positive news on the side of Augmented Reality developers who are using Vuforia and investigating the same issue.
Using the magnificent https://github.com/juicycleff/flutter-unity-view-widget repo; in your mobile app developed with Flutter, you can run the game you developed with Unity or the AR app you developed with Unity + Vuforia. You can use the app you developed with Unity, in the Flutter App you developed. They can also communicate each other in the Flutter App. You can pass parameters from your Flutter App to your Unity application in the Flutter App, and you can also pass parameters from your Unity application to the Flutter App. This means, you can pass parameters from your Flutter App's Dart code to the C# code of your Unity work and vice versa. For those who develop AR Apps with Vuforia, I would like to point out that for the scenario I am working on, I use Image Targets. I have same experience on the phone, with the Unity APK and Android Studio APK, they are in the same stability. Of course APK sizes are different, Flutter App APK size is of course bigger than Unity APK, but in my case this is absolutely ok.
As of May 2022, the answer to the above question is: Yes, you can. Moreover, for those who develop AR Apps in Unity using Vuforia, the answer is also: Yes, you can. I wish success to everyone who will start working in this scenario. Since it is a detailed subject, some difficulties are waiting for you on the way, but if you can see that the product you dream to achieve will be a stable Flutter App, with all the nice features, I am sure that you will find the enough motivation to bring all of them together. Good luck.

Is there a way to have Vuforia and ARCore in the same app?

We are currently developing an app for a student project, that we want to enable to use ARCore and ARKit on Android and iOS respectively and Vuforia as a fallback. After my project partner has already implemented ARKit and Vuforia in two separate scenes, I'm now trying to add ARKit.
But when trying to add both to the Android build under Player Settings -> XR Settings, I get the following message:
We would like to be able to allow users to always be able to fall back to Vuforia, but use ARCore on compatible devices. Is there a way to have both in the project at the same time?
AFAIK you would be able to do this if you're building Unity scenes into an android app built in Android studio or some other way. You would have a check for ARCore support on the device, and if that passes you would load a Unity scene that has ARCore support. If that does not pass you load another Unity scene that uses Vuforia. If you're working only in Unity like I am, I do not think it is possible. I could be wrong, though.
You have to go to the vuforia settings and select the option "Do not use" the Ar core requirement, the app build will proceed normally and the app will work without errors

How I can use unity render 3D model and native android?

I try to develop an app on AR, so the command way for developing app on AR is:
Unity and Vuforia.
Native android app and Vuforia.
The first way: I lose android App UI.
The second way: I lose unity render special in a complex model.
I fond another way to use android UI and unity render model by the export jar from unity app to the android studio but this way is slow and I need to export unity project in each time my list change.
I try WebGL but WebGL is not worked with Vuforia, and I can't find enough info about it.
How I can use unity render 3d model and native android without export data in each time data changed from unity to the android studio.

Changing scenes in unity using android app

I wrote simple game in Unity, but menu on android is quite laggy. I was thinking to create native android application with levels in game to choose and use it to change scenes in unity. Is this is possible?
There is some simple way to change scene in unity app using android app?

Categories

Resources