Hmm I have personally not done anything like this but this is what I would recommend that you do:
Download ADB (Android Debug Bridge). It should be installed together with Android Studio, otherwise you can get it here:
ADB for OSX: SDK Platform Tools release notes | Android Developers
To be able to run ADB from the command prompt, you will need to add ADB to the system variables. Edit the “path” variable and add a path to your platform-tools folder. For me it’s located by default at C:\Users<>\AppData\Local\Android\Sdk\platform-tools
ADB is needed to debug the NReal device (or any other Android device). This is usually done by connecting the device to the computer via cable. However, the glasses is also connected to the device by cable and you probably want to move around, so it is easiest to debug through wifi. To do this, make sure that the computer and device is connected to the same network, connect the device to the computer by cable, open the command prompt and run
adb devices (should show the device you plugged via cable)
adb tcpip 5555
adb connect << IP-ADDRESS >> ((Phone’s IP-adress) Now the device should be connected via wifi))
If the last command fails, try to ping the device
ping -t << IP-ADDRESS >>
When you get a valid response, there should be no problem to connect. If you don’t get a valid response, try turning wifi on and off on the device. This could take a while (~15 min if you’re unlucky).
If you’re successfully connected, you should be able to unplug the cable and run adb devices, and the device will show up like << IP-ADDRESS >>:5555.
The IP-address can be found under Settings > System > About Phone > Status
Download the android logcat package from the package manager. It lets you log errors from android devices
Now, for the actual building and debugging you’re going to want to
- Connect to compute unit using wifi. Select it in build settings as target (you might need to hit refresh). Set a new buildnr in appname so you know for sure it is the updated build.
- SaveAll in Visual Studio. And Save in Unity.
- Build and Run (!). Check that it is totally completed before starting.
- Make sure the permissions is set, otherwise use scrcpy to enter android settings…
- In visual studio you can attach the process to Unity, then you can use breakpoints to step through code.
- Use Debug.Log(“msg”); a lot.
- When getting tracking of the floor, look still at the floor for 3 seconds.
Now when you use the app on the phone with the glasses connected to the device, you should see a bunch of msgs and errors come up on the android logcat monitor. I hope you manage to find the issue, keep this post updated with whatever you find! Somebody else might be able to help you out further. Good luck friend.