Search Unity

Bug OnScreenStick and OnScreenButton not sending events to all objects on scene

Discussion in 'Input System' started by filipkrcmarevic555, Dec 1, 2022.

  1. filipkrcmarevic555

    filipkrcmarevic555

    Joined:
    Sep 5, 2019
    Posts:
    1
    I am using photon for multiplayer, I am spawning same player object for both of players, while WASD movement works just fine, actions called from OnScreenStick and OnScreenButton are called just on one of players and it is always on player that isnt mine.
    Following function prints true and false when I move using WASD while it prints just false when using OnScreenStick (joystick) or OnScreenButton

       public void MoveInputAction(InputAction.CallbackContext context)
    {
    Debug.Log(photonView.IsMine);
    _moveContext = context.ReadValue<Vector2>();
    }