"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 😦
9 Replies
you need to make the
InputManager
class itself public
not the fieldhow do I do that please?
you mean the script?
i mean that class
is that a class you wrote?
i'm rather new to this, sorry, what do you mean by class?
which line 🙂
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 itoh, 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
the guide you're following might be out of date, i don't know anything about unity myself
$unity might be more help
thank you mate i appreciate your time