Is it possible to launch Unity3d Android app with enabled VR in non-VR mode? - android

We developing an app for Oculus Quest with multiplayer and it's working fine. Now we've come to the moment where we need to have a non-VR spectator app that is built from exact same project, but allows to control only the flying camera to observe the scene with other users.
There is no problem with build for PC - just adding 'None' in VR devices list after 'Oculus' allow the app to switch to desktop mode (or skip VR device from code if it is presented), but if we want to build spectator app for Android with similar way, there is only the black screen from very start (even no Unity splash, but sounds tells us that app is working).
Disabling XR in Player Settings allow us to build for Android with required functionality, but then every single timewe should build twice - VR and non-VR apk. However, as we're using automated build server, that pipeline becomes a nightmare because first you're making VR build, then commiting changed settings, building again for non-VR, then changing settings back and commiting once more. That hell tooks an hour if not more and fills the repo's changelog with trash. Of course we could build locally, but it completely blocks the machine for next 30-40 minutes per build, so it is unacceptable.
Any ideas would be appreciated, my friends!

Related

How to debug when using ARCore?

I'm supposed to make a small AR app for android but since it seems ARCore can't use the computer's camera and Unity Remote isn't compatible with ARCore I have no way of running the app in the unity editor.
Only thing I can do right now is building the app, installing it on my phone, eventually create a canvas where I put some text to see if the app goes where I want it to go. I probably spent half the day debugging simple things because I can't find a way to have access to any console while using the app.
I can run a normal unity app with Unity Remote as long as ARCore isn't used, otherwise, it's just a black screen.
It's for a professional project so I can't just installed plenty of other plugins to make it work that way, I'm limited to ARCore and AR Foundation.

React Native slower cold boot when offline

I recently upgraded my react native app from 0.50.10 to 0.62.2. Everything went smoothly and I'm pretty happy with the enhanced performance Hermes provides on Android, however we found one major problem when trying to launch the app in offline mode, previous to the upgrade, if the app was offline, it would take 2 to 3 seconds to complete the start up process, now, after the update it takes up to 20 seconds to start! I'm counting only the time react native takes to load (the time the initial white screen is visible before the actual app loads).
A few more details:
This is only happening on Android, iOS loads almost instantly when offline.
When the app is launched in normal mode (not offline) the start up time is identical to what it was on our previous version.
I have enabled Hermes but even when Hermes disabled, the start up time is still way higher than it was before.
I have removed a few packages that I had the suspicion could be depending on network connections but so far I haven't been able to find a culprit.
Any suggestions would be greatly appreciated.

Automated deployment of unity3d builds to lots of android devices

I have a lot of Android devices that all want to run the same unity app, but the refresh cycle is long to test on all of them... I have to manually update each one when a minor change is made. Currently I'm manually downloading an apk (via http) on each device.
Is there a way to deploy a unity app to lots of Android devices? I have seen reference to this being possible in Android Studio, but I don't see a way to push from Unity to Android Studio for deployment, and it's not as elegant as I would like because I will need to have about 50 devices plugged in to USB. Something over the network would be way better.
I know this can be done with (expensive) enterprise deployment systems, but it's a little impractical when I'm making a change every few minutes.
Is there a way to do this without Android Studio? My build system is OSX, but any other operating system is available. Something like a Jenkins deployment would be pretty awesome.
Anyone have an idea? I was thinking that the app itself could check via http for updates, and it could update itself. It's a bit to code, but maybe is do-able. In that case, you have to manually install the app once per device, but after that it would detect if an update is available.
Once you deploy your app to the Google Play Store via your Google Developer Console you can set up automatic updates on your devices. Every time you deploy new apk your devices will get the newest version automatically.
You can of course deploy development version so only your test users can download it.

ADT - Changing an application code and seeing the results instantly

I'm currently developing an application for Android, using ADT and a tablet plugged in my computer in USB debug mode. Whenever I change my code I have to "commit", that is re-running the app, so I can see the changes I made. Can be a bit of a bummer. Is there a way to not have to do this? Something like "code-pushing" or similar. After all, this is in debug mode.
Reason I ask this is because I recall watching that documentary about Minecraft, and seeing Notch using debug mode in eclipse and making changes to the game instantly without ever closing or reloading the game.
For Android Java, you could use the layout designer, thought it's probably not what you're looking for (I thought I'd have to mention it). If you're looking for an instant preview, you have to be willing to change your current development environment and language.
Currently, Unity and/or Chaos Project can give you pretty good previews. That's probably what you saw for MineCraft.
There is also HTML/Phone Gap/Cordova that can be previewed on Node.js (either on the browser, or on a Node.js instance on the phone itself).
And there is Android App Inventor, which gives you an awesome real-time preview, but which unfortunately was written in Scheme/LISP, so it can not easily be extended using other languages.
If you're just looking to speed up your save and compile cycle in Java, I'd recommend you switch to Android Studio (instead of Eclipse ADT), and only download updates from Android Studio's Stable Channel. Once properly set up, Android Studio will save you time (however, it still won't give you anything like a real-time preview, but I still highly recommend that IDE).

Developing on AVD vs Actual Android enabled device

I just started to learn how to program an Android applications. Coming from a C# world, one thing that bothers me greatly about Android programming is the fact that it takes forever to actually test your app because you have to fire up AVD or wait until the app is installed on your actual device whereas for Winforms/WPF applications, you just hit that debug button and everything loads within split seconds.
My first question is, which is a more preferred way of developing to maximize efficiency? Develop on AVD or an actual device? Are there any suggestions on how I can improve my development speed?
A few things, most people leave the AVD open whilst they are developing so that they don't have to wait ten minuets every time they open it, however if you have a very slow computer and this is not an option then yes it will talk a while
If you have a faster computer then AVD is likely to be less laggy, but for a completely lag free testing place, use your actual device.
If you are making games you should look into libgdx because it allows you to test your apps on your desktop, then by changing one line, export them as .apk files and test on you android device
For a lot of apps and features within apps you will be left with no option but to test on your real device. Because it can take a while moving the .apk file to the actual device, I would recommend using an on device IDE to make small edits to your code whilst testing certain hardware features such as the volume buttons or the accelerometer. As for on device IDEs I would recommend AIDE - https://play.google.com/store/apps/details?id=com.aide.ui&hl=en
On the whole, I would recommend using eclipse with AVD, for the majority of your development on the majority of your apps, but for any apps that you need hardware functions for, I would recommend using an on device IDE (search the play store for android development for more options if you don't like my recommendation). Most importantly don't list your app until you have tested it on multiple screen sizes on the AVD, and you have tested it on you physical device
Keep the AVD open, you can keep doing debugs and test on it, it will automatically close and reopen with new code, that’s how I do at least, and I am the same, came from C# no experience with Android.

Categories

Resources