Best way to make my HoloLens 2 app run on smartphones - unity3d

currently I am working on a project designed for the Hololens 2 using MRTK.
Now I want to make this app run on a mobile device (more specifially, an Android Smartphone) like any other AR app. Eventually these two should be able to communicate with each other. What would be the best way to go about it? The following ideas crossed my mind:
Copying and adapting the current scene made for Hololens by replacing Hololens exclusive features with ARCore features.
Creating a new project just for the mobile app.
Would love to hear your suggestions and ideas, thanks!

MRTK supports a wide range of platforms, including mobile devices such as iOS and Android. You can use the MRTK API directly on your Android device instead of ARcore. For how to configure MRTK for iOS and Android please refer to this link:Configure MRTK for iOS and Android [Experimental]

Related

Is there a way I can test an Augmented Reality app on a phone that doesn't support ARCORE

I have a Xiaomi Redmi Note 8 Pro and it doesn't seem to support ARCore. I found some ways to dodge this but it appears to be quite complicated nor very safe.
My question is:
What other tools would you recommend if I want to create an app in Unity that also needs to use GPS modules, maybe altimeter and of course camera (AR stuff)?
I heard about Vuforia that might do the trick, also read something about AR Foundation from Unity. But to me, it looked like depending on chosen deployment it use AR Core or AR Kit(even Vuforia).
Any clearance about this maybe?
I suggest you don't try messing with your device. It doesn't support ARCore for good reason. And maybe you just try to use Android Studio Emulator, but Alas for some unknown reason, i try it but APK which is generated from unity can't be installed on the Emulator. Some stuff with the architecture
If you want to use Unity anyway. I suggest you use Vuforia. It works on most modern devices and doesn't even need device to test, just hit unity play mode and you can test around from your PC (need webcam).
Vuforia Engine provides a simulator mode in the Game view that you can activate by pressing the Play button. You can use this feature to evaluate and rapidly prototype your scene(s) without having to deploy to a device. (Source: https://library.vuforia.com/articles/Training/getting-started-with-vuforia-in-unity.html)
For Unity with ARFoundation, you can't use your PC like Unity with Vuforia, you need ARCore/ARKit supported devices.
Last if you want AR with GPS Modules (although this is not with unity) checkout AR.js https://github.com/AR-js-org/AR.js

Is there something similar to ARCore's anchor and pose in any other AR library

I wanna build measurement app for Android and iOS using Unity. Can some one guide me through as it is my final year project and I am confused what to use that will work on both Android and iOS for all devices.
I am confused what to use that will work on both android and ios for all devices.
This is not a very reasonable thing to ask. You can deploy your applications to iOS and Android with both ARCore and Vuforia. However, not every device can run ARCore or Vuforia. There is a list of supported devices for both of them.
For the task you want to implement you need to use Vuforia Fusion. Here is the list of devices that support Vuforia Fusion. On top of that these devices should fulfill certain requirements such as having minimum iOS 9+.
For ARCore the list is like this and ARCore also has requirements specific to devices. However, it is easy to say Vuforia supports more devices than ARCore. Therefore, Vuforia is used more in such applications recently but this might change in the future. I prefer ARCore over Vuforia because of the flexibility it provides to developers.
Since this is your final year project i would recommend doing a thorough AR SDK research first and then decide with which one to start. There might be other SDKs which might be better for the task in hand. Good luck!

Understanding VR ecology

I have background in android and have developed few apps of my own. Now I want to explore VR app development for android. Going through forums etc., first thing I understand is that I need to have basic infrastructure like unity 3d sdk, cardboard sdk, cardboard device etc. I am not able to understand roles these individual components play in overall bigger picture.
Like, why do I need unity 3d sdk if I have android sdk and cardboard sdk, and android studio as dev environment?
Then, if I plan to develop for something like Oculus then what all sdks and devices are needed, and which programming language I can work with?
Your options depend on which device you'll target:
Game engines like Unity: You need Unity and some plug ins and of course the device you will target too:
Google Cardboard / Daydream
Samsung Gear VR
From scratch application: Your language is java and you need to download the sdk for your target device:
Google Cardboard / Daydream SDK
Samsung Gear VR, Oculus Mobile SDK
Regards
I think there is a lot of promise in web-based VR. Of course, the app will not be as high fidelity as a native application built in Unity or Java but you get the benefit of being able to target many platforms out of the box. ReactVR is a cool project coming out of facebook that is making it easier and more performant to build VR apps with web technologies.
Here is a cool starter-kit that can help you get started if you are interested: https://github.com/scaphold-io/react-vr-graphql
P.S. GraphQL is a great tool for enriching your VR apps with data no matter if you're building it with React, Unity, or Java.
You can check out A-Frame (https://aframe.io), a web framework for building VR experiences. It's been out over a year and has a strong community and ecosystem. With web-based VR, you get cross-platform support across Rift, Vive, Cardboard, Daydream, GearVR out of the box. With A-Frame, you get all of the boilerplate with a single line of HTML. You just have to grab a VR-enabled browser.
A-Frame's architecture is similar to Unity's, entity-component, but A-Frame makes it declarative and similar to web development. With effort, the fidelity can rival native (https://blog.mozvr.com/a-painter/).

Unity: how to embed a VR Cardboard game into a website

Right now, I think there is not a way to do it within Unity. This is what I have found so far (please, correct me if I'm wrong):
The most popular VR plugins compatible with Unity for both Android and iPhone are Durovis Dive SDK and Google Cardboard SDK.
I have read that most Android phones are compatible with those VR plugins. My experience is that just a few are compatible. Durovis Dive SDK seems to be the most compatible one nowadays. If the Android phone has not gyroscope and the game has the Google Cardboard SDK plugin, the game won't load or crash. If the Android phone has not gyroscope, the game will load but the image will be still when we move the phone.
Unity 5.3 has been just released. It includes WebGL support. It includes VR support. Samsung Gear and Occulus are supported. However, I have not found out anything about the compatibility with others Android or iPhone devices. Maybe it works (I have not test it. I have not found somebody who has test it yet).
Here there is a list with VR technology for the web.
We can find stuff to Export an Unity scene to Three.js. Scripts and animations don't seem to work though.
I just spoke with an industry leader in VR experiences for media companies a couple weeks ago. And his company was one of the first to attempt VR in a web browser through mobile. He said it didn't work very well. He was partially successful, but if his company had problems, I'm guessing it's still a few years off. He said new additions to HTML are coming that will improve this over the next few years.
Hope that helps!
could you try WEBVR
YouTube Tutorial: Demo WebVR Unity
Although it has some defects, but it can serve you for basic applications. I was testing it with 360 videos, this was very heavy for the platform.
You may try WebXR. But you can't add both SDK at the same time.

Using IOS device to develop an Android game

as the title described my issue , my question seems to be dumb a little ; But because I don't own an Android device , But I published Android Apps using Genymotion Emulators. And I tried to download Unity Remote App on my Emulator but it does not work that well.
So my question here is : Can I use my iPhone device to test and develop the game that will be published to android users?
Yes, it is possible to do that since the Input methods being touches do not differ. The only thing you have to keep in mind is the wide range of resolutions used by android devices.
You can use can use your iphone for testing but jusst for the logic. The performance and resolutions are very different for android. Also if there is any platform specefic code you have written in unity then you have to take care of that.
Besides using your iPhone you can generate an APK from unity and install it on the android emulators to test.