- Home /
set up default NewProject location + folders
is it possible to set up a default path when starting new project in Unity? I always start new projects in my .../blahblah/UnityProjects/MyNewProject, so it would make sense if there was a way to do this.
I also use the same folders in my projects - _scripts, _prefabs, _materials, etc. and I always have to create all these folder over and over again when making new project. Is there a way to have Unity create these folders automatically?
Answer by Graham-Dunnett · Jul 11, 2014 at 05:44 PM
Pretty sure the project wizard just pulls the home folder and adds "New Unity Project".
To set up the assets folder, perhaps create a new project and manually create the folders. Then export that as a package. The new project wizard gives you a list of packages to import, so I guess if you can work out where that list comes from (probably a mix of some editor defaults and the location where asset store packages are found) you can have that project folder package imported into all new projects.
Answer by DeepwaterNewt · Sep 04, 2014 at 05:58 AM
Sorry to resurrect an old question, but I've found the answer, it's a simple registry entry that needs to be changed. See here: http://www.dociletree.co.za/adventures-in-unity-how-to-change-the-default-new-unity-project-path-in-windows/ for more information. This works for Windows installations only though...
this did not work for me. neither did I had the kProjectBasePath in the entry, only a string kProjectBasePath_. I created kProjectBasePath then but it didnt work, unity took the default project directory in my system drive :(
Answer by housmous · Jul 03, 2015 at 07:32 AM
In Unity 5, when creating a new project, select whatever path you want. That location will be used for future new projects.
Answer by ehfdub · Jan 25, 2015 at 01:15 AM
For Windows, Unity uses the personal documents folder as the default save-to location. As of Unity 4.6 this is not alterable nor does Unity save the last-used folder (unfortunately). I know this is a small feature but would be a nice time-saver for me.
If you're running Unity on Windows then you can try launching Unity from a script which sets temporarily updates the personal documents folder and reverts the value when Unity is closed. Details can be found here http://blog.electrongoo.com/how-to-update-unity3ds-default-project-location/
Good luck!
Answer by MurrayBridgeHS · Sep 09, 2021 at 02:28 AM
As we are running Unity in a school lab where the computers are heavily restricted, we needed a way that wasnt involved in the home folder as this is redirected to a network share for students, and the speed in reading/writing the Unity data to the share was very slow
Also we have the run command disabled so browsing UNC paths doesnt work so we were getting errors here as well.
The following registry keys are what control the path for the project and workspace path
Computer\HKEY_USERS*User*\SOFTWARE\Unity Technologies\Unity Editor 5.x
kProjectBasePath_h4113231939
kWorkspacePath_h3086459462
The data is stored in hexadecimal values in the above locations as a REG_BINARY string
Convert your desired path from a text string to hex https://codebeautify.org/string-hex-converter
The binary values set in the registry are represented as hexadecimal values but the method used here requires to pass regular decimal vales so we need to convert that as well We can use the scientific mode on calc.exe to convert the hex into seperate decimal values I got most of the info from this page https://devblogs.microsoft.com/scripting/how-can-i-write-binary-data-to-the-registry/
We used ActiveSetup to push the setting into the default user hive, so any new users logging in will have this set on first login Here is my code to set the paths to the local D Drive. It works for what we want.
'Setup Unity3D Default Project Path to D: Drive'
Dim uBinary
uBinary = Array(68,58,00)
WriteToRegistry HKEY_USERS, sTempHiveRef & "Software\Unity Technologies\Unity Editor 5.x", "kProjectBasePath_h4113231939", uBinary, "REG_BINARY"
WriteToRegistry HKEY_USERS, sTempHiveRef & "Software\Unity Technologies\Unity Editor 5.x", "kWorkspacePath_h3086459462", uBinary, "REG_BINARY"
Apologies if my wording is not correct or if the code could be tidied up, but I havnt seen anywhere that has been able to achive this so am happy to share if it helps.
And sorry this markdown is a bit unruley to try and format my reply in a readable paragraph
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Unity Editor Inspector creating gameObjects in world 2 Answers
Grey Screen Whenever Unity Editor Is Opened 1 Answer
Start/Update During Editor 2 Answers
Build a game from Illegal Unity 0 Answers