0
I’m making a 3D game in Engine Unity, an 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’ve come across a problem, which I know is simple to solve, but since I haven’t studied the language in depth, and I only master the basics of C, I have no idea how to solve.
I have, for this problem, 2 Scripts: The weapon and the character itself (FPS Controller). I want, through the character’s script to access the class "Pistol" which is that of my gun script, however, when I declare:
private Pistol arma;
He makes the following mistake:
"Assets/Standard Assets/Characters/Firstpersoncharacter/Scripts/Firstpersoncontroller.Cs(46,25): error CS0246: The type or namespace name `Pistol' could not be found. Are you Missing a using Directive or an Assembly Reference?"
I understand what this mistake is, I know what’s wrong, but I don’t know how it’s right.
PS.: If necessary, I can put my code to better view the error.