Unity camera not moving - unity3d

I'm trying to get started with Google Tango for Unity by following this tutorial: https://developers.google.com/project-tango/apis/unity/unity-prefab-motion-tracking
But when I build and run my project, the gyroscope doesn't seem to work and the camera doesn't respond.
I'm using Unity 4.6.7.
Any suggestions?

All of the samples have worked for me without issue in unity 5.1.3f1 personal.
you could try connecting adb logcat and observe for errors during execution.
find ADB.exe in the android SDK directory
from a command prompt run it with the parameters 'adb.exe logcat -c' to clear the logfile, then again without the -c and watch for errors.

In Unity, the gyroscope on some Android devices is disabled by default, assuming the device has one. So you might need to enable it when the app starts up to make sure it is being used, by using Input.gyro.enabled = true;
It also might be that the app is for whatever reason not asking for permissions, which is then resulting in the app being automatically denied access to the gyroscope and camera by the device.
There might also be some other logic that is interfering or altering the gyro data in some way. It's very unlikely, but possible, so it might be worth looking into if all other suggestions fail.
Hope you find a solution soon.

Related

Unity export to 64bit apk will cause the gameplay delay

I have tried to export my game to mobile APK. When I'm export my game to 32-bit APK, everything is working fine and smooth
But when I'm trying to export as 64-bit APK, the gameplay is a delay (eg: when I click a button, it need wait few seconds or more to have a response, this case is not happening in 32-bit APK). But the sound effect and background music is playing fine, didn't have any delay for the sound.
Below is the setting for my 64-bit export
Setting:
I will get these warning message after I exported, are these may caused my issue?
Warning Message:
May I know have what issue or reason may cause this situation happen? Hope have someone able to helping me to solve this issue. Thank you
UPDATED:
I found reason is my script have to much FixedUpdate process in running to cause delay. So, I reduce the number of FixedUpdate to solve the problem.
May I know why 32-bit able to support the number of FixedUpdate, but 64-bit unable to support?
On what device are you testing this? An Android emulator? This could be just an emulation problem and not be an issue on a modern real-world device.
Try disabling stack trace option for debug logs.
You can find it in the player settings, at the bottom of "Other Settings"
Set "Stack Trace" for "Log" to "None"

Oculus Go: How to keep awake while still in app

I'm working on an Oculus Go app, using Unity, where the user is literally expected to sleep while using the app and with the headset still on their head. I seem to be running into the problem where the Oculus Go goes into power-save mode because of inactivity. Presumably, the user isn't moving enough when they are in a deep sleep.
Although I've included instructions for the user on how to disable sleep as a device-wide setting, this is far from ideal. iOS has idleTimerDisabled (Keep iPhone from sleeping) which is a simple one-line stay-awake type of command. I'm looking for the Oculus Go equivalent of iOS's idleTimerDisabled
Does anyone have any hints on how to keep the Oculus Go from turning off?
Just to be clear, this stay-awake behavior should only happen while the user is wearing the headset and using the this app, and only this app. If the user takes off the headset, normal turn-off behavior should be immediately restored.
Thanks in advance,
JJ
Include
Screen.sleepTimeout = SleepTimeout.NeverSleep;
in your MonoBehaviour script if you just want keep the device awake while app is running and helmet is worn.
https://docs.unity3d.com/ScriptReference/Screen-sleepTimeout.html
As of May 2019, it is not possible to keep the Oculus Go awake. Oculus wrote to me
Unfortunately, this doesn't look to be functionality (disabling sleep when there is no movement) that is available at this time.

Kinect not being detected on other computers after deployment of UWP

I recently finished to develop a UWP based on the SDK example CameraFrames. On the second screen of this example (and also on my app) you can choose to preview the frames taken by the Kinect v2.0 as shown below.
On the top of the image on the right of "Grupo de fontes" (Source group) I am able to choose between the different cameras that are connected to my PC. The problem comes when I deploy my app to another PC, I am unable to see "Kinect V2 Video Sensor". Thus rendering my app obsolete as it needs to be portable between PCs. I have checked that inside "Package.appxmanifest->Capabilities->Web Cam" checkbox is ticked.
I am out of ideas as I don't have a clue why my app works flawlesly on my computer but not on the rest. If you need any extra info to help me with my problem please let me know.
It is worth noting that on the other PCs that I've tried my app can read frames via Kinect Studio or MatLab.
Inside "Camera privacy settings" my app has privileges to use the camera.
Thank you in advance.
Update due to Nico Zhu's comment
My OS is Windows 10 and my target version is "10.0.16299.0". I have downloading and deploying CameraFrames on the second computer that I'm working with but it doesn't recognize the Kinect as in input source. Even though CameraFrames doesn't work doesn't read anything, I can properly make use of the kinect using Kinect Studio.
It seems that my problem is focused on my second computer not being able to make use of the Kinect on any deployed UWPs. What should I installed in order to make sure that I have all that's needed to properly read from the Kinect?
At the end of a lot of headaches I just needed to upgrade my drivers.

Profiling a running iOS app without a computer attached

I would like to profile a running app without a computer attached. Pretty much what the sample command does on Mac OS X. Is it possible ?
I would like to do this without any computer attached because my app gets into an endless loop only at certain GPS locations. I tried reproducing the problem by faking GPS fixes but I couldn't. Yet the issue is 100% reproductible in the field…
You can try logging suspected method and loop entry/exits to a file, and recover the file later using iTunes Document sharing or Xcode.
No - I'm pretty sure it isn't, as Apple does not allow developers to use any iOS-development tools on the platform itself. You might be able to build analytical stuff into your own app (RAM monitor etc.), but not by using another app.
Anyway, your computer is much better suited to the task than a device - so sick with it.
Maybe some day Apple will let us test/write iPhone apps from iPads...

Using Shark to profile an iPhone game, pressing "Start" doesn't do anything

I've done a decent amount of reading about how to profile iPod applications using Shark, and all works well until I try to click "Start" (and nothing happens). I've tried profiling an individual process (app), all processes, and it doesn't seem to Start. This tutorial is one place that I used to set it up (so I think I'm following all the steps):
http://rudifa.wordpress.com/2009/09/16/profiling-an-iphone-application-with-shark/
(I've also rebooted my mac and iPod)
Anyone have any ideas on what to try next?
Shark support has been dropped on iOS 4. Official Apple position can be seen here:
https://devforums.apple.com/message/243237
They expect you to use Instruments and Time Profiler instead.
Have you tried the Time Profiler instrument? Apple seems to be moving in that direction.