Bamdad Bamdad - 3 months ago 12
C# Question

How to change Game_Data folder in unity for windows

Helllo, Sorry for my bad English

I have a unity project for windows platform in unity and I want to change the data folder name, Example:

If we make a project and name it "TheGame" after building, we will have:


  • D:\...\TheGame\TheGame.exe

  • D:\...\TheGame\TheGame_Data\



And how can I rename "TheGame_Data" to something else?

Thanks

Answer

I just tested this and I renamed the folder DATA in all caps. The game still ran fine for me. My Unity version is 5.3.5f1.

Although, I can't personally find any page that talks about changing this folders name you should check this link out.

https://docs.unity3d.com/ScriptReference/Application-dataPath.html

I found someone trying to change the name to DATA here:

http://answers.unity3d.com/questions/321932/renaming-the-data-folder.html

The problem here though is after rebuilding the game, the folder gameName_Data will show up again. Since Application.dataPath is read only, I think you are stuck with renaming the folder after every build and deleting the old renamed folder.

Hope this helps.