unity remote requirements check failed что делать
CommandInvokationFailure: Unity Remote requirements check failed
Здравствуйте. На сайте впервые. Это мой первый вопрос, так что прошу прощения, если что-то указал не так. Делаю игру на Android и при старте в консоли выбивает следующую ошибку:
CommandInvokationFailure: Unity Remote requirements check failed
C:/Program Files/Unity/Hub/Editor/2019.4.17f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\platform-tools\adb.exe forward tcp:7201 tcp:7201
stderr[
error: no devices/emulators found
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.ADB.Run (System.String[] command, System.String errorMsg) (at :0)
Изначально думал, что проблема именно в моём проекте, но когда я создал новый пустой проект и сменил платформу на Android, то выдалась идентичная ошибка. На телефоне режим разработчика активен, передача файлов включена. В Project Settings установлено Any Android Device. Более того, это же проблема возникает и тогда, когда телефон не подсоединён к компьютеру. Очень прошу помочь мне
Unity remote 5 not working / setup
In this post we will explore how you can setup unity 5 remote. Also if your unity remote 5 is not working what some of the possible solutions are to fix it. As you may know unity remote 5 is an excellent tool to allow you to test your unity games. It allows you to test on a android or ios device while you are developing. For this post we going to be looking at the android setup. This seems to be the one most people have an issue getting unity remote 5 working with.
Setup android device
In order to setup your android device you need to make sure that android developer options are enabled. If you don’t have them enabled yet. You can go over to your settings->about phone/tablet. Then scroll down and tap build number 7 times. This will then unlock developer options on your android device.
Unity remote 5 – enable android developer options
Once you have your developer options enabled you should be able to enable usb debugging and mock location. See below screenshots for what needs to be enabled to allow your android device to use unity remote 5.
Unity remote 5 – developer options settings
Once you have done this you can now start installing unity remote 5. Make sure for any issues you are having either in 2018 or 2019 that you use unity remote 5. You can download unity remote 5 here to your device. Once installed run unity remote 5 and you should see something like this.
unity remote 5 open app
If you have gotten this far then your mobile device is about ready to start being used with unity. Let’s now look at the unity settings you need.
Unity settings for unity remote 5
Before you can start setting the options in unity you need to make sure you have the android sdk installed. Go ahead and install that. Once installed you should have an application called android studio. Run android studio and click on tools and sdk manager.
Next you will need to install the google usb driver. So to do that follow the below instructions.
Click on the sdk tools tab. You will now see this.
Check the Google USB Driver checkbox and click apply and ok to install the driver. You should now have everything you need from android studio.
The next step requires that you launch unity hub and is where most of the issues are when your unity remote 5 does not want to work. So open up unity hub.
Click on installs then you will get something similar to this.
Click on the 3 dots for the unity version you have. Then click on add modules.
Make sure you have android build support checked and click done.
Now create yourself a new unity project. Then you can change the following settings.
Click on file->build settings
Click on Android and Switch Platform.
Unity set android build for unity remote 5
Next we need to setup unity to allow our android device. In order to do this click on edit->project settings.
Click on edit on the left and choose any android device.
Next we need to make sure our sdk is correct. Click on edit->preferences.
Make sure Use Embedded JDK is checked.
Now you can simply plugin your android device using a usb cable. Then you need to use PTP camera as your usb method. This will allow unity to stream your game to unity remote 5.
Frequently asked questions
What is unity remote 5?
Unity remote 5 is a app which you can install on your mobile device. Which will allow you to run your Unity game straight on your mobile device while in the Unity editor. This will help you simulate input you may need to get from your device for your game.
Can you use Unity for Android?
Unity fully supports android development. You can use the Unity remote 5 app to test your unity game on your android device. Then when you are happy you can compile your unity project to a apk for use on your mobile device or publishing to the android app store.
How do I publish a unity game on android?
In order to publish a unity game you need to build the apk file. To do this you need to go into Player settings->Build settings choosing the android platform and build your apk. Once you APK is built you can upload it to the google play store.
Where can I download unity remote 5?
You can download unity remote 5 for android from the google play store. For apple you can get it from the apple store.
Why is my unity remote device not showing?
If you have not installed the google usb driver for your android device it may not pickup your device. To install it you need to go into your android studio ide and install the google usb driver package. Also you need to make sure that your adb service is running to pick up your mobile device.
Or check out some of my other blog posts and tutorials here is a great one on how to do drag and drop in unity.
Unity Remote
Unity Remote is a downloadable app designed to help with Android, iOS Apple’s mobile operating system. More info
See in Glossary and tvOS development. The app connects with Unity while you are running your project in Play Mode from the Unity Editor. The visual output from the Editor is sent to the device’s screen, and the live inputs are sent back to the running project in Unity. This allows you to get a good impression of how your game really looks and handles on the target device, without the hassle of a full build for each test.
Note: For Unity Remote to work, you need to have the Android SDK on your development machine.
Unity Remote replaces the separate iOS and Android Remote apps used with earlier versions. Those older Remote apps are no longer supported.
Older versions of Unity Remote are still available for use in Legacy projects; see Legacy Unity Remote documentation for more information on these versions.
Device and Feature Support
Unity Remote currently supports Android devices (on Windows and OS X via a USB connection) and iOS devices (iPhone, iPad, iPod touch and Apple TV, through USB on OS X and Windows with iTunes).
The Game View of the running Unity project is duplicated on the device screen, but at a reduced framerate. The following input data from the device is also streamed back to the Editor:
Obtaining and Using Unity Remote
You can download Unity Remote for free in the form of a Unity project that you build yourself, or as a pre-built app from the device’s app store:
Once you’ve downloaded the app, install and run it on your device and connect the device to your computer using a USB cable.
Note: To specify the location of your Android SDK, go to Edit > Preferences (Windows) or Unity > Preferences (Mac).
Click the Play button in the Editor to see your game appear on the device and in the Unity game window as Unity connects to the Remote app. While the game plays, input from the device (accelerometer, etc.) is sent to your scripts A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary as if they were running on the device itself.
Troubleshooting
I have more than one device plugged in, but only one of them works with Unity
Unity Remote doesn’t support multiple connected Android devices, and to resolve this, it automatically picks the first device it finds. However, it is fine to have multiple iOS/tvOS devices and one Android device connected at the same time, since you can select which one to use from the Editor settings (menu: Edit > Project Settings, then select the Editor category).
I’m getting really poor graphics quality when running my game in Unity Remote
When you use Unity Remote the game actually runs in the Editor, while its visual content is streamed to the target device. Since the bandwidth between the Editor and the device is limited, the stream must be compressed heavily for transmission. This compression A method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
See in Glossary inevitably reduces the image quality.
In the Unity Remote section of the Editor window (menu: Edit > Project Settings, then select the Editor category) you can switch the compression method between JPEG and PNG. PNG compression is “lossless” (so the image quality doesn’t degrade) but uses more bandwidth than JPEG. A downsized image has lower bandwidth requirements than one at full resolution. By changing these settings, you can trade image accuracy off against framerate as necessary. When using a lower resolution, be aware that Unity Remote downsizes images for better performance.
Bear in mind that Unity Remote is only really intended to give a quick approximate check of how your game will look and feel when running on the device. Make sure that you occasionally do a full build and test the “real” app.
Getting «error: device offline» from adb.exe in Android Player SDK / Setting Up Unity Remote 5 (Solved)
First of all, this is my first post here and I’m a beginner so my apologies if this ends up being a stupid question or my format is wrong, but any help is appreciated.
Essentially my problem is in trying to set up Unity Remote 5 for debugging in Unity. However, I believe I’ve finally narrowed it down. The error I’m getting now seems clear:
CommandInvokationFailure: Unity Remote requirements check failed C:/Program Files/Unity/Hub/Editors/2019.4.17f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\platform-tools\adb.exe forward tcp:7201 tcp:7201
stderr[ error: device offline]
stdout[]
exit code: 1
I’ve looked into this error and came upon this: https://stackoverflow.com/a/39031464/14948855 which seems like it might be useful to me, however the issue is I don’t know how to run the commands he suggested and stack overflow made it clear it didn’t want me posting a question as a response to that question and I don’t have enough prestige to comment.
I’m trying to run «sudo adb kill-server» from an ubuntu linux terminal on windows from the directory abd is in (C:\Program Files\Unity\Hub\Editors\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools), but it won’t run.
I’ve tried adding it to the path on my computer: I added the directory listed above to «Path» in my «Environment Variables».
My phone is plugged in, I’ve disabled and reenabled developer mode and usb debugging, and restarted Unity and my phone several times. Any help with running this command in ubuntu or cmd, or even the greater problem of Unity Remote 5 would be fabulous.
Edit: here’s a better image showing my issue:
Final Update: All my problems have been solved, here’s how I got unity remote 5 for android working for posterity:
step 1) Make sure phone is in developper mode (go to «about phone» in settings, tap build number 7 times).
step 2) Make sure «USB debugging» is turned on in developer options.
step 3) Make sure Unity is updated to the most recent supported version through Unity Hub (might not be required but I did this step).
step 3) Download android support module through Unity Hub.
note: if you downloaded current Unity version from the Unity website rather than through Unity Hub, it doesn’t seem to let you add modules to it through Unity Hub.
step 4) The sdk path Unity specifies by default is wrong for some reason, so in preferences->external tools, disable the default path and paste in the right directory (should be something like: C:\Program Files\Unity\Hub\Editors\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK) to be safe I did this for the JDK, NDK and Gradle too.
step 5) When you plug in phone, pull down your notifications, hit «tap to change USB options» and make sure phone is in «camera» mode or some variation. For me it was «Photo transfer».
Note: if you don’t have the option to change USB options, try different usb ports/cables, if those don’t work you might have debris in your charging port, clean it out with a dab of 91% or 99% rubbing alcohol and a tooth brush/tweezers (this will also make charger sit more snug in phone)
That might be enough to get it working for you, if not.
step 6) (Not sure if necessary) May need to update phone drivers in device manager on windows.
step 7) If Unity gives an adb error saying too many devices connected, it’s possible you have a daemon running in the background which adb is picking up as an android emulator because it’s using a port greater than 5555. It seems adb checks open ports above port 5555, and assumes anything it finds is an emulator. To check this, as indicated in my original question, and as stated here: https://stackoverflow.com/a/39031464/14948855, in cmd on windows use adb devices (if ur on linux may need to use sudo) to get a list of all devices being detected by adb. (Also use «adb kill-server» to reset it.) If there is an emulator being detected, it should include the port it’s using in its name, in my case it was «emulator-5562» in port 5562, which was apparently actually NTKDaemon from Native Instuments, a random music production program I’ve only used once so far. I’d suggest googling the emulator port you find to try and narrow down the process taking that port. The only thing left to do is to kill the process running in the port. I found NTKDaemon in task manager and also disabled it activating on startup because that’s just evil imo.
And that should be it. Hope that works for you if you’re here for help.
CommandInvokationFailure: Ошибка проверки требований Unity Remote
поэтому в настоящее время я создаю игру для Android, я установил файлы Android SDK и JDK с помощью Unity Hub, и я хочу попробовать игру на своем телефоне и загрузить Unity Remote 5, но когда я пытаюсь сыграть в нее в Unity, это просто дает мне эта ошибка;
И я просто не знаю, как решить эту проблему, у кого-нибудь есть идеи?
3 ответа
На данный момент я не знаю, как это исправить, но если вы не хотите снова видеть это сообщение, перейдите в НАСТРОЙКИ ИГРОКА, редактор, Unity Remote, устройство и выберите «НЕТ».
Попробуйте выполнить следующие действия по порядку:
Подключите свой телефон.
Измените тип подключения на USB-модем.
Включите режим разработчика (если он уже включен, выключите его перед подключением телефона)
Включите отладку по USB (если она уже включена, выключите ее перед подключением телефона)
Когда вы включите отладку по USB, ваш телефон попросит разрешить подключенному компьютеру доступ к RSA, разрешите его.
Теперь переключите режим подключения на «USB для передачи файлов / Android Auto», телефон снова попросит разрешить компьютеру доступ к RSA, разрешите его.
Теперь откройте Unity Remote 5 на своем устройстве.
Играйте в редакторе Unity.
Меня устраивает! Надеюсь это поможет 🙂
Вам необходимо установить драйверы ADB:https://adbdriver.com/downloads/
Если это еще не работает, возможно, вам придется установить Android SDK и Java и указать их пути внутри Unity.