"InputManager" is inaccessible due to its protection level

Hi all I'm currently trying to work put raycasts by following a tutorial however there is an error in my code, it says "InputManager is inaccessible due to protection level" however even though I have made what I think is the issue public, the problem persists. I've attached the code I think is causing the problem(s) here. Any help would be greatly appreciated. Thanks! EDIT: I was asked to make "inputmanager" public, however i cannot find the line i need to change and i am confused as to what to do? hope someone can help me 😦
No description
No description
No description
No description
No description
No description
9 Replies
Jimmacle
Jimmacle•8mo ago
you need to make the InputManager class itself public not the field
THA FORBIDDEN SLAPPER
THA FORBIDDEN SLAPPER•8mo ago
how do I do that please? you mean the script?
Jimmacle
Jimmacle•8mo ago
i mean that class is that a class you wrote?
THA FORBIDDEN SLAPPER
THA FORBIDDEN SLAPPER•8mo ago
i'm rather new to this, sorry, what do you mean by class? which line 🙂
Jimmacle
Jimmacle•8mo ago
InputManager is a class it should be defined somewhere with an accessibility level, probably internal based on the error but it sounds like something that's part of unity which means you aren't allowed to use it the way you're trying to use it
THA FORBIDDEN SLAPPER
THA FORBIDDEN SLAPPER•8mo ago
oh, that's strange because the tutorial i was following did this and it's worked for everyone else, where would i find this information? is this in the code i've wrote or is it elsewhere? did this as in wrote the code i had and it worked fine for them sorry if my questions seem dumb, i'm very new to coding and unity
Jimmacle
Jimmacle•8mo ago
the guide you're following might be out of date, i don't know anything about unity myself $unity might be more help
THA FORBIDDEN SLAPPER
THA FORBIDDEN SLAPPER•8mo ago
thank you mate i appreciate your time