sschmid / Match-One

This is a simple and interactive Unity3d example project to show how to use Entitas
https://github.com/sschmid/Entitas
197 stars 54 forks source link

Downloading a fresh copy of Match-One won't allow to generate with default settings #3

Closed KumoKairo closed 6 years ago

KumoKairo commented 6 years ago

It's settings are set to Assembly-CSharp.csproj by default, but the project is generated with the name of the folder which is Match-One-master.csproj image image Generating with the default properties shows an error of finding Assembly-CSharp.csproj and doesn't generate anything at all.

My guess is that it fails on a last step when everything is generated but it can't update the csproj file directly so it doesn't write anything on disk. I think this last step of updating the .csproj file shouldn't be so destructive. We can let everything generate and just leave our .csproj file alone, just warning the user that he's most likely have another project file name and it should be updated in the properties (we can even infer the name of the project based on different .csproj files in the root of the project.

Recap - downloading the package and trying to generate doesn't always work out of the box.

sschmid commented 6 years ago

Hi, for (to me) unknown reasons Unity doesn't generate a csproj file with a consistent name. For some, it's always Assembly-CSharp, for others it's ProjectName.csproj.

Solution and project files are not committed because Unity can regenerate them. If the name is different for you, you have to update the project path first or deactivate the CSProjPostProcessor.

See https://github.com/sschmid/Entitas-CSharp/issues/563

and

https://github.com/sschmid/Entitas-CSharp/issues/572

As of Entitas 1.4.2, there's a ValidateProjectPathPreProcessor which will inform you about this issue when you generate and the project is missing or cannot be found