- Home /
I Have a problem. The Log is 'Couldn't set project path to: C\....'
I have a problem. I loaded sample things(RenderingPluginExample42, SimplestPluginExample). But those have a issue. The Log dialog(Console) show me 'Couldn't set project path to: C:\...'.
What is this problem. I need your help. Thanks.
probably a write error. $$anonymous$$ight be some permission. Is the project placed in dropbox/google drive or something similar? also could you provide the rest of the file path?
This is probably just a typo but the question title says:
Couldn't set project path to: C\
Is the error really:
Couldn't set project path to: C:\
i.e. are you missing a colon?
It might be one of a few things: - you're not running Unity3D with ad$$anonymous$$istrator priveledges - the given path doesn't exist on your computer (eg you don't have C:\ as the drive you have windows installed on)
Actually I used one of path under desktop folder. So, I think I don't need any permission. So, What's my problem. Help again plz.
Exact Error message : Couldn't set project path to: C:\\Users\\User01\\Desktop\\Simplest\\Plugin\\Example\\Unity Project\\ Plugin\\Assets
The code isn't using a valid path, it's as simple as that.
The error message indicates you don't have /s in the path. Add them like you'd see in Windows Explorer.
Answer by Graham-Dunnett · Apr 27, 2014 at 04:50 PM
This message is only generated when you use the -projectPath
command line argument. Unity will tell you if the file path that is given does not represent a Unity project. A Unity project is the folder that contains the Library
and Assets
folder. The OP has given a path that includes Assets
so is one folder too deep.
Does this problem affect the working of the project by any chance?
Answer by neildixley · Aug 07, 2015 at 04:11 PM
I have had this same problem for a few days. I was running the unity in command mode from a bash script and it would fail with the same error. It turned out that the command line option works a little oddly as I found out. From a Terminal window the following works just fine:
/Applications/Unity/Unity.app -batchmode -projectPath /Users/you/pathtoproject -quit
However this exact same command line fails when inside a bash script with the error 'Cannot set project path to /Users/you/pathtoproject' You need to format the option -projectPath=/Users/you/pathtoproject with an equals sign between -projectPath and the path rather than a space as indicated in the documentation.
Hope this helps if you get stuck when automating builds
This was exactly my problem, didn't realize I needed an equal sign since the doc page didn't mention it.
I have a bunch of projects setup to auto build exactly the same way on a Jenkins server and I ran into an issue where the last project that was manually opened in Unity was being built ins$$anonymous$$d of the project associated with the Jenkins Job.
So I updated my build parameters to look like this: BUILD_PARA$$anonymous$$S="-quit -buildTarget ios -batchmode -projectPath='./' -execute$$anonymous$$ethod Project.Autobuild."$BUILD_FUNC
Your answer
Follow this Question
Related Questions
"Failed to import package" when creating new project 5 Answers
How to animate a moving platform GameObject? 2 Answers
Path error? 0 Answers
Path drawing script giving error 0 Answers