Wednesday, November 23, 2022
HomeGame Developmententer - Unity InputSystem will Ship however not Broadcast

enter – Unity InputSystem will Ship however not Broadcast


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):

Action for "ToggleView" bound to Keyboard/SpaceBar

The PlayerInput is ready to Broadcast:

enter image description here

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?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments