I'm doing a 3D game on Engine Unity, a FPS to be more specific and taking advantage of this experience to learn programming in C #, the one I'm having in school.
But now I came across a problem, which I know is a simple solution, but since I did not study the language in depth, and only mastered the basics of C, I have no idea how to solve it.
I have, for this problem, 2 Scripts: The weapon and the character itself (FPS Controller). I want, through the script of the character to access the class "Pistol" that is the one of my script of the weapon, however, when I declare:
private Pistol arma;
It gives the following error:
"Assets / Standard Assets / Characters / FirstPersonCharacter / Scripts / FirstPersonController.cs (46,25): error CS0246: The type or namespace name 'Pistol' could not be found. ? "
I understand what this error is, I know what is wrong, but I do not know how that is correct.
PS: If necessary, I can put my code for better visualization of the error.