- Home /
how to describe a android path in c# script
hello everyone plz read it fully; i have an unity scene which has login®ister menu which is working perfectly for pc when i convert it to android its not login or registering and that is because the c# code i used will not work online instead it will create a notepad file within a given location for registering and login menu will access the same path to login my problem is when i convert it to android the system path should be changed to android and i dont know how to describe the android path i will attach my script plz help me thank you or if you have some other method you can most welcome to suggest me; link textlink text
Answer by Serellyn · Jun 04, 2018 at 12:36 PM
Well, you are writing to 'E:', no mobile application will be able to access that. Neither will any computer without an 'E:' disk. Try to use the 'Application.persistentDataPath' instead, you can find more information right here: https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
thanks i tried but i am not sure where exactly should i put that and i tried but it is not working could you type that in the code that is given above
Sorry man, I'm not gonna open all your code and edit it because I'm on mobile. But you should just replace things like: @"E:/UnityTestFolder/" + Username + ".txt" with 'Application.persistantDataPath + "/" + Username + ".txt"
Your answer
![](https://koobas.hobune.stream/wayback/20220612164042im_/https://answers.unity.com/themes/thub/images/avi.jpg)