- Home /
How to get MTP device (my phone) path ?
Hello I'm currently developing a game on unity for a course project, and I absolutely must be able to store my backup files on my phone from my computer and also I must be able to retrieve them. I'm on windows 10 with an android phone.
I tried to use the NuGet MediaDevice package, but it doesn't work with unity. For the following reason (package author's answer)
According to the information in Wikipedia, Unity uses the Mono framework for scripting. MediaDevices does not support Mono because Mono has no COM support and MediaDevices is a wrapper for the Windows MTP COM interface.
Does anyone have a solution? Maybe it's possible to use this MediaDevice package with my own DLL ? I don't know if that work This is an important part of my project. Besides, you have to be able to do it offline.
Thank you.
I don't understand your question, please try to be more specific, do you just need to store things from your game on your phone so that you can retrieve them later?
Then my game is played on PC I save my progress in the Application.persistentdatapath. And I want to be able to copy these backups to a phone plugged into the computer. And that way I can retrieve the backups on any computer by plugging the phone into it.
The specificity is that everything has to be done offline so we want to go through the phone to be able to move backups.
The problem is that the phone is an $$anonymous$$TP device and therefore there is no existing path to access it. There are other methods such as packages but not necessarily compatible with the operation of unity as $$anonymous$$ediaDevice for example.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer