MultiplayerEventSystem Same UI BUG

Hi ! I have the same problem as the last guy who posted (and the one before, SAEM2710) in : [SOLVED} Multiple EventSystem . (I am not digging up the post because it’s solved)

I really can’t find any answer, to believe that’s why all local co-ops have split menus or cursor like Super Smash Bros, if you know a solution to this problem i am interested ! Thanks !

(In short, you can’t create a character selection menu like Street Fighter, because when two selectors from each player cross, one causes the other to disappear. (Then it is not superimposed either, but that’s another thing). I think this is a problem with the MultiplayerEventSystem …)

Mm, this one is a bit trippy. Its not so much a Bug as much as things like Button, Toggle, etc, do not understand “Multiple event systems”.

You could create a reticle per player… ie the Selector Object here which is assigned from a manager when the player joins and the Player prefab is instantiated.

7146545--855185--upload_2021-5-16_14-55-43.png

The selector graphics are designed such that when they overlay they’ll occupy different corners, but you get the idea.

public class Player : MonoBehaviour
{
    public Transform selectorObject;
    PlayerInput input;
    EventSystem eventSystem;

    private void Awake()
    {
        input = GetComponent<PlayerInput>();
        eventSystem = GetComponent<EventSystem>();
    }

    private void Update()
    {
        selectorObject.position = eventSystem.currentSelectedGameObject.transform.position;
    }
}

Thanks for your answer ! I had so given up on the idea of one day receiving an answer to this question ! It’s simple and efficient, but I have an error when the selector wants to change the button: MissingMethodException: UnityEngine.InputSystem.UI.InputSystemUIInputModule.OnMove Due to: Attempted to access a missing member. System.RuntimeType.InvokeMember

Problem which is apparently related to having Input System UI Module with PlayerInput on the same gameobject … How to do then ? ( Unity New Input System MultiplayerEventSystem and InputSystemUIInputModule is commented out )

I just made the error disappear by creating an EventSystem gameobject under the Player prefab where I moved the Input UI Module and the Multiplayer Event system inside, thanks !

Input Module would have an event for OnMove, which would clash with PlayerInput when it is set to InvokeUnityEvent or SendMessage mode. Putting it on a child object is definitely a good solution :slight_smile: