Input events like InputJump, InputUse still triggered if the GameObject is disabled
MyroP
Events like:
- InputUse
- InputJump
- InputMoveHorizontal
- InputMoveVertical
- InputLookHorizontal
- InputLookVertical
Are still called even if the GameObject is disabled with SetActive(false) (See screenshots).
But disabling the script with enabled = false; works.
I am not sure if this is an expected behavior, but personally that issue confused me, If I disable a GameObect I would expect everything to be disabled, not just certain events like Update(), FixedUpdate(), OnDeserialization()...
Log In
Fairplex
If we compare with regular C#, its possible to call public methods from a disabled script. I think this is intended behavior.
iffn
I checked this bug as well and it seems to happen when the GameObject is enabled by default and then disabled by a script. When the GameObject is disabled by default, the event does not get called. I think the assumption is that the GameObject hasn't registered the event yet.
Not sure if this is the intended behavior but it does seem to be quite counter intuitive.