- Home /
Code works in one project but not another project
So I've exhausted any ideas I have to solve my issue. This code is from a youtube channel called Sebastian Lague on his pathfinder playlist, it works and it works somewhat well. The issue is it stopped working in one of my projects, but it was fine in any other project I made or created. I tried switching Unity versions, uninstalling packages, resetting project settings, I've even copied over all the code from the project that it wasn't working in and put it in a new project, and it worked. Then I tried to bring over all my assets from the project it wasn't working in and put it in the one it was working in, and it stopped working. So I cant figure out what's wrong. I won't post the code because I know it works, but I'll say it practically identical to the Youtubers code for the most part. I want to know if anyone has any ideas on why it wouldn't work after all that?
Posting the code could very well be helpful to us finding an answer. It's likely that the code is dependent on some kind of project or scene setting. It could also be an order-of-events thing, and depends on script priority, which is configurable in the project.
If you really don't want to post the code for some reason, then I'd suggest putting in breakpoints in Visual Studio and making sure the functions in the script are getting called in the first place.
You might also try (backing up and) deleting your Library folder in your project, which will cause Unity to recreate all those files the next time you open it. I fixed a custom property drawer this way recently - it can help if something gets corrupted during serialization.
Your answer
Follow this Question
Related Questions
Including a .zip and .pdf file in an asset package upload? 1 Answer
Project Settings-> Publishing Settings Cant be find in Unity latest version for Window Store App 0 Answers
What is saved in the Game file when completed 1 Answer
Virtual Reality not supported!! 1 Answer
Where is the file that contains the quality and player project settings located? 1 Answer