Packaging ARCore Unity Projects for distribution - unity3d

I have just picked up the Unity ARCore project and have been having a bit of a play around with it. Very exciting stuff for AR on Android devices!
I am interested however in how developers in Unity are meant to package the applications for distribution through the Play store if it is also necessary for users to install the arcore-preview.apk ?
What is it exactly? And is there a way of bundling its contents in a Unity build?
Exciting stuff!
O.

Yes, the arcore-preview has to be installed on your target device (this is not only necessary for the Unity export but for the others as well).
As soon as the project matures I am sure the ARCore service will be downloadable from the Playstore as well.
For now you could ship the APK in your own app's asset folder or download it as first step in your application but be aware that the handling of apps installing apps has changed in Android O

The current release of ARCore is intended only for developers to start exploring possibilities of AR on Android. We'll share more specifics about distribution at the end of the developer preview.

Related

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!

How do I add Vuforia SDK with Unity after the installation of Unity?

I have already installed Unity on my PC.now I want to use Vuforia with Unity.But in new Vuforia site they don't provide us to download their SDK for already installed Unity.How can I download it.
Actually if you install unity 2017.2 or newer no need to add vuforia sdk. Just go to file-> build settings-> player settings ->click on vuforia augmented reality
And also in new versions of Unity (e. g. 2019.2.10f1) it is File > Build Settings > Player Settings > XR Settings > Vuforia Augmented Reality Supported checkmark
This will automatically import vuforia related assets into unity.
Install the latest version of Unity, and in the Unity component
selection section of the installer, select Vuforia Augmented Reality
Support, along with either the iOS Build Support or Android
Build Support packages.
Create a Vuforia developer account from the Vuforia registration page. This account gives you access to the tools you need to make
AR and MR applications with Vuforia in Unity.
If you have not already created a Unity ID, then do so from the Unity registration page. You need a Unity ID to download any
packages from the Unity Asset Store.
Open Unity and create a new 3D Project (make sure the 3D option is selected next to the Add Asset Package button). Name your Project,
then click the Create project button.
To activate Vuforia in your Unity project, access the Player settings
from Edit > Project Settings, then select the Player category,
and select the tab for the mobile device you are building to. Under
the XR Settings panel, enable the Vuforia Augmented Reality
Support property.
From Unity Docs
Since 2019.3 Vuforia is not native in Unity 3D anymore:
On Friday January 24th Unity posted an “XR Platform Updates” article.
Unfortunately, the original version of this article included unclear
information about Vuforia Engine. Vuforia Engine is still supported,
and will continue to be supported, in Unity. What has changed is that
the Vuforia Engine package will no longer be natively distributed by
Unity but can be easily obtained from the Unity Asset Store via our
Core Samples or our hosted NPM registry. You can learn more about how
to download the Vuforia Engine package here.
We apologize for any confusion. If you have any questions, please feel
free to post them on our community forums.
Thank you,
The Vuforia Team
We have to download an external SDK again: https://library.vuforia.com/content/vuforia-library/en/articles/Solution/vuforia-engine-package-hosting-for-unity.html

GameAnalytics, validating in app purchases on Unity

I'm setting up for the first time GameAnalytics in my Unity3D project.
I'm try to figure out if there is a way to validate in app purchases for both android and iOS from it.
In the docs I found http://www.gameanalytics.com/docs/ga-data#business-event. I understood that you need to work with native sdks to get this feature, am I right?
Could it be an option to configure from the dashboard an android and an iOS game and then changing the keys in unity with precompilator instructions? (like #if UNITY_ANDROID)?
I am an SDK developer # GameAnalytics.
Yes.
There is a way to make the GA servers validate Android and iOS IAP purchases in business events. From Unity.
Short story
You need to send the receipt in the business event after the purchase.
You can read our complete Unity tech guide in the Github Repository.
Regarding IAP validation you should read this section.
https://github.com/GameAnalytics/GA-SDK-UNITY/wiki/Business%20Event
About the keys
You should create a game for Android and iOS in our tool at go.gameanalytics.com
Inside the Unity Editor you can add platforms (Android / iOS) and then add specific keys to each.
You can read more about the in-editor settings in the wiki docs as well. Including how to login and select games directly in the editor.
Let me know if you have any issues. You could also file a support case with our friendly support staff.
When you install the Game Analytics unity package, you are essentially installing the native libraries for each platform (Android, iOS, ...) located in the Plugins folder.
If you want to target multiple platforms in your code with an API like Game Analytics, I recommend you use the preprocessor tags as you mentioned since the functions from Game Analytics are platform specific.

Unity Test Tools Prevent Mobile Builds

So I'm having a rather interesting problem. I have the Unity Test Tools in my project for unit/integration testing. But when I go to make a build to Android (Do not have Android Pro) it says that I'm not able to, because the Unity Test Tools has a reference to System.Net.Sockets. There are no scenes that has Unity Test Tools referenced or anything like that. Does anyone have a work-around for this, or at least can confirm my issue?
This seems very ridiculous to have for a testing framework to stop me from building my project.
I am not entirely sure about what Unity Test Tools is, but as long as this plugin uses .NET Socket Support if you check the unity licenses comparison you will realize its unavailable to Android Free.
Hope this helps you.

Unity3D cross platform Augmented Reality Plugin

Is there a AR plugin for Unity3d which can work on Android, Iphone, Mac and Windows etc.
I'm not sure, but while last year no any plugin like that is exist, some of plugins worked on mobile devices some only on desktops.
By my opinion for mobile devices the best it's Vuforia plugin.
Officially Vuforia not supported desktops but I guess with some tricks is possible
to start using it by that way (try to look this: How to use vuforia on PC Application).
Other solution is to use OpenCV bindings inside unity.