I am making an attempt to organise my challenge so that every MonoBehaviour receives related impulses/actions and handles them.
I’ve the next:
InputManager
: Empty recreation object with a PlayerInput part. Used to configure/change mappings, deal with input-related performance.
MapController
: GameObject with a number of performance and youngsters that sits alongside the InputManager. Must be conscious when the ToggleView
motion is fired.
I’ve an applicable motion (tied to the spacebar):
The PlayerInput is ready to Broadcast:
If I create a public void OnToggleView() { ... }
in MapController
, it by no means fires.
Nonetheless, if I connect the next to the identical GameObject because the PlayerInput…
public class TestShim : MonoBehaviour {
public void OnToggleView() {
Debug.Log("Check shim toggled");
}
}
It fires simply wonderful.
Identical if I change the mode from Broadcast to Ship.
I used to be below the impression that Broadcasting ought to verify for related strategies on all enabled GameObjects?
What am I lacking / how can I increase the occasion in MapController
?