Unity 5 after publish, android scene appears empty - android

I'm working on a school project and we are building a game for Google Cardboard using Unity 5. I have all the drivers, SDK, and JDK files I need and I can play the game in editor and it will appear on my phone via the Unity Remote 4 app. It has terrible fps (less than 10, I'd guess) but that's not even my question.
I tried publishing the project and moving it to my phone to see if that would help with frame rate. Instead, I got a blue screen. Blue like an empty unity scene. I can still see the cardboard outline interface so I know that objects are still in the scene but I can't see anything.

I don't know if this can help you (without any further information) but you could try these options
turn off Cardboard.SDK.nativeDistortionCorrection: to make Unity draw directly to the screen.
Edit Cardboard.CreateStereoScreen() and change the settings.
ORIGINAL POST: First answer by user "smd"

Go to File > Build Settings, select Android as the platform.
Click Player Settings, Under Resolution and Presentation, change default orientation to Landscape Left.

Make sure split application binary is unselected under publishing settings

I had a problem with a blue screen on Android devices which sounds similar to this one. From what I found out it may happen that some Start() callbacks are not called correctly on Android in the startup scene. If nothing happens but the camera is active it only renders a blue background screen. This happens only very sporadically.
There are two things you can try:
Create an "empty" startup scene which only loads your actual scene.
Use not only Start() but also OnEnable() for backup.
If you are interested in the complete story have a look at my blog entry.

Make sure you hit "Add Open Scenes" in Build Settings such that all you scenes are added to the build. This was the solution for my case.

I have resolved my issue for Google cardboard by these steps.
Edit -> Project settings -> Player -> Other settings -> Graphics APi
And remove Vulkan from the list by clicking - at the right bottom of the box.

Related

Visual Studio how to disable VS Output Window's auto scrolling to bottom during Android/Xamarin debug run?

I am losing my mind ...wondering how could the following behaviour be the shipped default user experience in Visual Studio where all technologies involved are Microsoft-made:
use microsoft visual studio (2019)
use microsoft Xamarin.Forms to make an app
run the app in debug mode to see updates in the VS Output window
every new line that comes in through logcat from my phone to VS, force auto-scrolls Visual Studio's builtin Output window to the bottom and there's no way to stop it?!
I have to either: 1. stop running the app and read the output. Or 2. futilely wrestle with the damn scrollbar and fight Visual Studio to try to maintain the output window's scroll on a specific position enough moments to read anything.
How did this get past any internal QA for Xamarin? Did they ever try to, you know, make an app? Am I blind? Is there an easy way to stop auto scrolling? Why isn't it enabled by default? The default behavior should be: if the scrollbar is all the way to the bottom, then auto-scroll, sure. But if the scrollbar has been moved by the user, then stop auto-scrolling for the love of god! (this is common sense in many other software)
Also, there's no button on the Output window that locks the scrolling.
This is a hack not a solution, but it works:
Just Ctrl+F anything in the Output window. As long as and while this is active / has found something, the auto-scrolling will be locked/stopped. (and you can still use the scrollbar manually)
So the functionality IS already in VS. Just MS didn't bother to add a scroll lock button for it, or have a manual scrolling override. Microsoft has this lovely track record of insistently not using their own products in a way that actual human beings (read: not imaginary simple target personas) will definitely need to use them.
Release a Microsoft dev environment that can't have a pausable (readable) Output window? Microsoft: Sure, why not? We don't see the problem here. Why would you ever want to read the output of your application? What an edge case!
Try placing the caret (in the Output window) somewhere other than at the bottom.
If I click somewhere in the output other than at the very end, Visual Studio will stop scrolling to the bottom.
I haven't tried it with an Android/Xamarin project, but I assume the output window behaves the same for all project types.
Place your cursor in output window then
autoscroll on Ctrl+End
autoscroll off Ctrl+Home

vuforia unity project on android phone shows triangle broken screen

I currently have a simple Vuforia and Unity project for android where I have a postcard as a target, and then you can cycle through a set of pictures while you are looking at the target by swiping left and right on the screen. However when I run the demo on my android phone(Samsung Galaxy S6 Edge), the demo divides the screen into two separate triangles where one is completely black, and the other triangle changes color based on where the camera for the phone is facing. I've attached a still image of the problem where it shows white for one triangle, black for the other, and my image target is the postcard placed on the table broken demo image.
Any help would be greatly appreciated, this error has been going on for some time. If I need to post anything else please feel free to let me know.
Thanks!
we faced this problem too. Here is the solution-
Go to Build Settings > player Settings , On the right hand side a window will change, go to Other Settings and Auto Graphics API untick, and Open GLES3 remove it by pressing negative sign
Hope it works

Preview Issue Android Studio

as already told in the title, I have an issue regarding the preview tool of Android Studio.
As I install the program, all works fine. I can create layouts and previewing them without any trouble. The problem comes when I restart my computer. Every time, the preview tool disappears (grey unselectable menu option and no other buttons to activate it around) and I can't manage to make it work again, unless I re-download Android Studio and I re-update the SDK. It's really annoying, because it's difficult to project a layout without restarting the computer, looking at what you are doing or loading it every time on the phone.
I've attached a screenshot, can anyone help me? Does anyone know a solution?
as you can see, there is no preview and no button to activate it
What about clicking on the design tab at the bottom of the editor ?

How to use Sikuli for Android testing?

I am testing an Android application with Sikuli, but each time the test runs the behaviour is different:
the test stops at the first command, not finding the first image
finds only some images and the test stops at a particular image which isn't found
finds all images and the test runs successfully
Sikuli is runned on Windows 7. Does anyone know if it's a problem of focus or something else and how to solve it?
Thanks
Maybe you can fix your recognition issue by changing the matching level. From Sikuli Gui :
Click on the image
In Pattern Settings > Matching Preview, drag the Similarity bar to a value below 1.0 (try different values)
You may also need to add a delay for the browse button to appear on the screen. You could try something like this
wait("Browse.png", 10 ) # Wait for up to 10s for the app to load
You might also try increasing the size of the picture that you are matching to. Try including nearby artifacts. Remember that you can change the location on the picture that is the mouse click point if your Browse button is not dead centre.
You can try any click action twice, using a try/except block.
Sometimes the vision algorithm just fails.
Running the Android Emulator (for anything) is paaaainffullly sloooow and arbitrary.
So, it pays with Android ems to make Sikuli statements a little "smarter,"
like this:
wait(browsebutton.png, 20)
onAppear(browsebutton.png, click(browsebutton.png))
Looks busier, but it makes the script "smart" in both waiting for the button, and then clicking it as soon as it appears (instead of waiting twenty seconds if it appears after five).

Is it posible to take Screenshot of homepage using Android SDK.?

I am currently working on an application in-which I need to take the screenshot of the homepage and also is it possible to get the exact location and count of the user's homepage widgets. i.e how many widgets are placed on user home page and whats there location or position on screen. X axis and Y axis coordinates etc.
For taking screenshots; Yes, it's possible, using the SDK, and the DDMS utility. Example here: http://www.youtube.com/watch?v=n3h1EYExu7c
For widgets on home-screen, not AFAIK. A problem that immediately arises is; what if the user have switched to other 3d-party HOME-screen with different widget-model? (For example, not grid-aligned, rendered on 3d surfaces or whatnot)
To avoid you going to youtube, I'm posting the content here:
Want to take a screenshot, but don't want to root your phone? Here is
how:
1) Install the Android SDK
2) Enable USB debugging on your device
3) Run DDMS from the tools directory
4) Select your phone from the list
5) Go in the menu, select Device, and then Screen capture. Whalah.

Categories

Resources