Page 1 of 2
Getting CS2001 error
Posted: Sat Aug 25, 2018 11:46 pm
by SuperSal
To be exact: its giving me the following error
error CS2001: Source file 'Assets/Plugin/Pixel Crushers/Dialogue System/Scripts/Model-View-Controller/View/Sequencer/Sequencer Commands/SequencerCommandAnimation.cs' could not be found
Now my dissertation is due tomorrow..I need to get DSU up and running..ASAP!!
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 1:04 am
by Tony Li
Hi,
Did you import a broken package that's preventing Unity from compiling? What changes did you make right before this error occurred?
Revert to an earlier version of your project.
If you don't use
version control, start using it as soon as you fix this problem. In the meantime, try importing the Dialogue System into a new, empty project.
If that works correctly, try reimporting the Dialogue System into your main project.
If you still get the error after reimporting, look for any other warnings or errors that might explain the problem. If you don't see any, remove other assets from your project. One of them is probably preventing Unity from compiling.
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 2:30 am
by SuperSal
I did, removed it once or thrice already..every time I reimport the same thing happens all over again..is it not possible if you can you just send me the missing item and get it over with? I usually import the assets via asset store from within Unity
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 4:09 am
by SuperSal
I have no clue how Version Control, actually works
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 7:21 am
by SuperSal
Ok, I've downloaded and imported UDS into a fresh new project..It working but not in my VR/Dissertation project..Guess, I'll drag the missing files from there to my current project folder
Edit: I just copied the missing files from the new project to my current project..and guess what? The missing that its talking its there!! I just replaced them with the new one
Think, I've found problem. I was trying to copying all of content from the Pixel Crusher's folder of the new project to my current project . A message pops asking me to approve, to 'shorten the file name' either I can skip, approve or cancel it.
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 8:38 am
by Tony Li
This is an issue with Unity's compilation step. If the file path is too long, it fails to pass the filename to the compiler correctly.
Here are two ways to shorten the filenames:
1. Shorten the OS path to your project. For example, say your project is in:
C:\Users\SuperSal\Documents\Unity Projects\My Dissertation Projects\Virtual Reality\Talk To Gods Project\
You could shorten this to:
C:\Users\SuperSal\Documents\Talk To Gods Project\
(Close your Unity project before doing this.)
2. Or shorten the paths inside the project. Version 2.0.4 will help out with this by renaming this path:
Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Model-View-Controller/View/Sequencer/Sequencer Commands
to this:
Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Commands
(I renamed Model-View-Controller to MVC, and I moved the Sequencer folder outside of View.)
You could do the same in your current version 2.0.3.1 project.
Either way should help you get the path short enough for Unity.
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 9:23 am
by SuperSal
Understood....You explained what should I do..but can you explain how do I do it?
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 11:04 am
by Tony Li
To shorten the OS path to your project, close Unity and move your project folder. For example, if you're using Windows and it's in your Documents folder in a series of subfolders named 'My Dissertation Projects > Virtual Reality', then move it out of those subfolders and directly into your Documents folder.
To shorten a path inside your Unity project, open your project in Unity. Navigate to Plugins / Pixel Crushers / Dialogue System / Scripts. Rename 'Model-View-Controller' to 'MVC'. With any luck, that will be enough, depending on how deep your OS path is.
Either way, make a backup first, just to be safe.
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 4:19 pm
by SuperSal
I did, everything you said..but unfortunately its not yielding results that I deserve..guess, I have to create a whole new project..Import UDS first and then copy and paste my entire files from my old project to this new one..Hopefully, things will be straight forward from there on..
Re: Getting CS2001 error
Posted: Sun Aug 26, 2018 6:53 pm
by Tony Li
Try this:
1. Exit Unity.
2. Move your entire project (that is, the folder that contains Assets, Library, and ProjectSettings) to C:\.
3. Open the project in Unity.
4. Delete Plugins/Pixel Crushers. It's possible that your troubleshooting steps caused some problems with its files.
5. Reimport the Dialogue System for Unity.
If you're not using Windows, let me know.