- Home /
Can I change Application.dataPath?
The build creates the "appName.exe" file and the "appname_Data" directory in the build location.
What I want is to create and execute a number of exe files in the sub-directory.
However, if the exe file is renamed or repositioned, an error occurs when running.
For this purpose, I wonder if it is possible to modify the path setting of the data needed for the exe file when building.
Hi @ParkKiWan ,
I'm trying to change application data path to be somewhere else of my root project folder. Did you find a solution ?
Answer by Bunny83 · Apr 15, 2021 at 03:36 PM
No, at least at this point I'm not aware of any way to change that, you can not change the data path. The exe file that is shipped with your build is actually just a copy of the Unity engine player. It always searches for a data folder right next to the exe that has the same name as the exe with the "_Data" appended.
Maybe they include an option or commandline argument in the future, but as it stands it doesn't seem to be possible at the moment. So the player and its _Data folder are one unit. You can place them whereever you like as long as they are next to each other.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
How can I automatically add a file to Application DataPath on build? 1 Answer
How to prevent unity build from deleting existing/custom files in application datapath 0 Answers
Saving build number to a file inside build data folder 2 Answers
Eror "UnityEditor.BuildPlayerWindow+BuildMethodException" 0 Answers