I am trying to create an android game but I have a problem.
- I create a folder with the first char Capital). fe: Champions
- I change the folder name to lowercase (fe: champions) and when I build the apk file I see it with the first letter Capitalized. fe: Champions
images: Inside Unity I have a folder champions (they are all lowercase): folder champion in Unity -> Assets/StreamingAssets/
but Inside the apk I see the folder champions with C capital: folder inside the apk -> assets/
When I am trying to run with Bluestacks or my phone I cannot find the champions folder because the C is Capitalized.
This is a bug ?
Can u assist me please ?
thx and sorry for my engilsh.
For now I created new folders names from outside the Unity and copy paste them inside Unity (fe: from champions -> champs) and now I can find the files and folders.
CodePudding user response:
This issue is caused by the fact that the file system on some platforms, including Android, treats file and folder names as case-sensitive, while Unity treats them as case-insensitive. This means that when you create a folder with a lowercase name in Unity, it will be stored as uppercase on Android devices. To solve this issue, you can either change the name of the folder to uppercase in Unity before building the APK or change the name of the folder to lowercase on the Android device after the APK is built. Another solution is to use an external tool that allows you to change the case of the folder name, for example, the command prompt on Windows allows you to use the "ren" command to change the case of a folder name.
CodePudding user response:
Thx M. Burhan Ahmad for your response.
As I said before it keeps the created folder name and not the renamed. If you create a folder with all lowercase it will build the apk with this format (all lowercase). If you rename it with Capitals and build it again it keeps the first format (all lowercase)... I tried to change it inside the Unity.... with c#... with cmd ... but always take the same results... I tried to delete the folder and create a new one with the same name with capital but the same result...
I found a way ... I put all my files and folders inside a new folder "champ" and now I have access to my files and folders...
BUT this is a problem to Unity... In Unity we can see the changes but inside the apk.
Try this:
- Create a folder (Test)
- Build it with android settings. (inside the apk you will see the folder name "Test")
- In Unity change the folder name to "test".
- Delete the old apk and Build it again.
- Inside the apk you will see the "Test" and not the "test". (as you can see in my images in first topic).
thx again.