sschmid / Entitas

Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MIT License
7.03k stars 1.11k forks source link

Could not find a part of the path issue #980

Closed TheTharin closed 2 years ago

TheTharin commented 2 years ago

Hi!

I'm relatively new to Unity and ECS, so I've been fiddling with it for the day.

I've decided to set up unit tests as it was shown in one of the latest DesperateDevs videos, but to no avail on Windows + VStudio 2019 combo. The issue was in "missing temp*solution_name*.dll". I made a quick googling and found out it could be anything from wrong path to .NET versions missmatch. And yeah, I've had my path to my project contain a space. So I renamed it like that: drive:\Project Name\Assets -> drive:\project_name\Assets and Jenny stopped generating code. When I tried opening Preferences in Unity-Tools-Jenny to Auto-Import again - I got that error: Could not find a part of the path drive:\Project Name\Entitas.properties.

That's when I realized it was set up wrongly. I tried moving contents of Jenny.zip in the root folder - it was not building files. In the output it said that it had successfully built new components, but in reality - it did not. As I've just started - I decided it was not a big deal to create my project anew. I've created a new project, imported Entitas once again, tried to open Jenny preferences - same error with the same old broken path: Could not find a part of the path drive:\Project Name\Entitas.properties. I've then backed up some systems and components from the first project and deleted all of them. Then created a new project from scratch - same error. That's when I started to realize Jenny preferences were sitting somewhere inside editor, perhaps? I've uninstalled my editor, my hub, cleaned registry with CCleaner, rebooted PC and reinstalled everything. Same error. I've started looking, where Unity keeps it's cache - then I've cleaned AppData\Local|LocalLow|Roaming Unity related folders. I've basically deleted ANY Unity folder out there. I've deleted all the previous projects folders on my disk. Then I've created another Unity Project, - now it prompted to download Entitas again. I'm still getting the same error. What could I have missed?

UPD: I've fixed it by creating a folder drive:\Project Name\ and placing Entitas.properties file there, then changing Jenny's default properties file to the Entitas.properties file in my current project. It worked, but I'm still curious - why didn't it reset after me cleaning everything Unity-related from the PC?

ssvjatoy commented 2 years ago

EditorPrefs.DeleteKey("DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.PropertiesPath");

sschmid commented 2 years ago

The path is cached in EditorPrefs, @ssvjatoy solution should work