Help me get Daydream working on Unity? :O
Hi guyyyys
I've been trying like heck to get Daydream working in Unity and my Macbook, my goodness it's not easy.
I'm running 5.6 Beta, and so followed these instructions: https://developers.google.com/vr/unity/get-started
I've followed every step and now I'm stuck on an error getting the Daydream controller emulator working in Unity itself, and it seems like I'm stuck on this error:
"Android Debug Bridge (`adb`) command not found.
Verify that the Android SDK is installed and that the directory containing `adb` is included in your PATH environment variable."
I've googled far and wide, and I found this thread which proposes that this would make it work "adding the PATH before starting Unity 5.6 seems to recognize the controller emulator fine when starting the in-game testing.":
https://forum.unity3d.com/threads/5-6-0b3-linux-daydream-controller-emulator-wont-work-adb-command-not-found.451423/
But I have no idea what that actually means... Anyone know?
I've been trying like heck to get Daydream working in Unity and my Macbook, my goodness it's not easy.
I'm running 5.6 Beta, and so followed these instructions: https://developers.google.com/vr/unity/get-started
I've followed every step and now I'm stuck on an error getting the Daydream controller emulator working in Unity itself, and it seems like I'm stuck on this error:
"Android Debug Bridge (`adb`) command not found.
Verify that the Android SDK is installed and that the directory containing `adb` is included in your PATH environment variable."
I've googled far and wide, and I found this thread which proposes that this would make it work "adding the PATH before starting Unity 5.6 seems to recognize the controller emulator fine when starting the in-game testing.":
https://forum.unity3d.com/threads/5-6-0b3-linux-daydream-controller-emulator-wont-work-adb-command-not-found.451423/
But I have no idea what that actually means... Anyone know?
Comments
Here's the full error though, hope this makes some sense to someone :/
Android Debug Bridge (`adb`) command not found.
Verify that the Android SDK is installed and that the directory containing `adb` is included in your PATH environment variable.
at Gvr.Internal.EmulatorClientSocket.setupPortForwarding (Int32 port) [0x000b3] in /Volumes/TU_media/game_dev/_experimental/DaydreamTest4/ddtest4/Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorClientSocket.cs:141
at Gvr.Internal.EmulatorClientSocket.phoneConnect () [0x00039] in /Volumes/TU_media/game_dev/_experimental/DaydreamTest4/ddtest4/Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorClientSocket.cs:86
at Gvr.Internal.EmulatorClientSocket.phoneEventSocketLoop () [0x00017] in /Volumes/TU_media/game_dev/_experimental/DaydreamTest4/ddtest4/Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorClientSocket.cs:62
UnityEngine.Debug:LogWarningFormat(String, Object[])
Gvr.Internal.EmulatorClientSocket:phoneEventSocketLoop() (at Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorClientSocket.cs:65)
On Windows 7, it's Control Panel > System > Advanced System Settings > Advanced tab > Environment Variables...
Scroll down System variables to "Path" or "PATH", and change that value. You want to keep it the same as it was, but add the folder path that contains your adb.exe, separated by a semicolon. Be careful changing this, as stuffing it up could affect your computer elsewhere. <_<
Dunno how it works on a Mac, if that's what you're using.
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/pathToTheAndroidSdkFolder/android-sdk-mac_86/platform-tools
That last bit looks kind of right but also very wrong - "pathToTheAndroidSdkFolder" doesn't look like it can be the right thing at all, and I'm not entirely sure how to fix that... Any terminal-savvy peeps here? :/
/Users/steventu/Library/Android/sdk/platform-tools
The above is the path I need to get in, I assume that "usr" somehow translates into "/Users/steventu/"?
http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/#.WMck8zvysuV ?
The colons seem to separate each entry.
sudo nano /etc/paths gets me this:
echo $PATH gets me this:
The last line is different. But they should be the same. Also I have no idea if I should be using "usr" instead of "users/steventu"........
@Thelangfordian no I haven't got it sorted yet >_<
is adding /Users/steventu/Library/Android/sdk/platform-tools correct? Assuming default settings? I notice that everything else is "usr" instead of the full "users/steventu", does that matter?
Here's my echo $PATH now:
That very last line seems to have been added by the android sdk or something, but it doesn't look right, or is it right?
I would suggest navigating to the platform-tools folder in your terminal. Type pwd, and it will print the full path, and make sure that the path is correct. If not, use the pwd path that is printed out.
Check your /etc/paths file for that last error path and make sure it is not there, if it is delete it, and make sure it is only your platform-tools path that is added.
If the above doesn't work then there is a different way to fix this, which is the way I add android stuff to my path.
I followed what you said, did the pwd, and copy pasted that into the path file (the only difference was a capital letter on "user"), restarted my machine and it still didn't work, same adb error :(
Oh and that last entry is still there, I assume, because the android sdk adds it on startup, I think. Whether it's right or not right I have *no* idea.
And no, I don't know what you mean by adding something to .bashrc file... I have no idea how to do that so no :P
In that first link they mentioned that running Unity from terminal seems to make it work... I dunno how to do that, I tried cd applications/unity and it's not there, I assume there's something I don't understand about the osx file structure and that "Macintosh HD/applications/unity" is a thing I don't know how to get to...
If you want we can arrange a Teamviewer session or a meetup and I can try and help out?
But not if I run it from my task bar...... Some progress... At least...
Daydream controller emulation works in Editor as long as I launch from Terminal.
Now I'm having trouble building to APK.
Context, I'm running:
Unity 5.6 beta
OSX
Android Studio 2.3 (latest as far as I know)
When I build to APK it throws this error: In Console: The Android SDK path is set, I'm certain. In fact if I deviate from "/Users/steventu/Library/Android/sdk" it actually doesn't continue to build and asks me for the sdk path until that one is put in.
I'm not sure if I have the LATEST Android SDK version - I know Daydream requires Android SDK 24, I read that somewhere, but I can't find any download that SAYS Android SDK 24 OFFICIALLY. I googled and found a bunch of SDK 24 and SDK 25 downloads from non-official sites and they look suspect. On the official site all I can get to is Android Studio, which DOESN'T TELL ME SHIT ABOUT THE VERSION.
I know it says it's an android sdk error, but could it be a misdiagnosed Java error? My jdk folder setting points to "/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/", does that look right?
I AM GOING NUTS PLZ HALP THANKS >_<
/tools is in the same level as the /platform-tools directory, so in your case, the tools folder should be
/users/steventu/library/android/sdk/tools
You should also make sure you have the right stuff installed in the SDK Manager.
In Android Studio at the welcome screen, click Configure at the bottom right, then SDK Manager in the drop down.
You need to make sure to have the right Android stuff installed, I have placed arrows in screenshots below what I think you need to install. (You can ignore the rest, leave it to whatever it is on your system, this is a screenshot of my ADB setup)
Imgur page with pics
I hope this helps...
But it still won't build, with the same error, do I need 7.0 AS WELL AS 7.1.1? I'm going to get it now anyway to see. But to your experience, do you need both?
The Daydream documentation says 24 minimum, so API 25 should work, but I would grab API 24 just in case.
Ensure the other downloads (arrows in images above) are up to date.
If that still doesn't work then I would need to actually be on the computer myself to see what's going on.
I've rebooted, I've done everything I know that could matter, this is what my screenies look like now:
Siiiiiigh D:
https://forum.unity3d.com/threads/5-6-beta-daydream-osx-apk-build-failing.461156/#post-2994387
The build is going YAY :D
I have been struggling with that exact problem all day now, and I am totally wasted. I have tried everything that I read here and in other communities, nothing worked. Does "open from terminal" mean simply use the open-command? I don’t know what Xterm means.
Tuism, did you succeed without having to start from the Terminal, without the abd problem and without the Build problems? I am thankful for any hint.