Hi Tamas,
Your issue appears to be one of housekeeping
The first error in the list is caused by you having a class with the same name in the same namespace. Global is effectively not in a specific namespace. I opened your project within Visual Studio and, as you are using the Standard Assets you have multiple projects (that’s ok). But the problem is that you have, by the looks of it, copied a folder from your project directly into the Editor directory, thus creating a copy of the same named class.
Here’s a screen shot to show you;
The above is your main project. The three projects below the red box are those required in order for their classes to be built so that you can then use them within Unity.
If we however expand the Tutorial_rpg.Editor project (the second project in this list), we can see this;
The green box identifies the second project, the red box within it identifies a duplication from your main project that has been added to this one.
Visual Studio is creating errors because of these duplicates.
If you apply a little housekeeping and tidy up, you should be able to remove these errors.
Hint : Remove the entire folder, “Assets”, as shown in the red box within the green box in the above screenshot, everything in it etc… all errors are removed.
Note: The above step assumes you haven’t been working on/modifying these duplicates scripts by mistake. If you have any doubt, make a backup of your work first (outside of the project).
After this, when you run the game (Village scene) you’ll have a couple of other errors spring up.
The first is that your Main Camera is now missing a script, this is because you had referenced one of the duplicated ones instead of the one in your main project. Following the error message through I believe this should be the CameraRaycaster.cs script. You will then need to specify the size of the layers array and select the layers accordingly.
The next issue is that this scene is missing an Event System, this isn’t related to the duplication of files, you’re just missing one. Right-click in the Hierarchy and select UI / Event System.
After this you should be able to run the game again (Village scene) and move the mouse around and the cursor will change accordingly to target, walk, unknown etc.
If you click to walk you will receive another error message, this time because your notifyMouseClickObservers
is null
- I’ll let you have a look at that one.
Hope this helps you get back to where you want/need to be.