Skip to content

Button Multiplayer

The Button (Multiplayer) component extends Game Creator 2's button functionality by tracking which player interacts with the button. This component passes the interacting player's event system through to all instructions executed by the button via the Target property.

Setup

  1. Add the Button (Multiplayer) component to a GameObject
  2. Add a UI Image component (required for button functionality)
  3. Configure standard Unity button settings as normal
  4. Set up your instructions using Target to reference the interacting player

How It Works

When a player interacts with the button:

  1. The component identifies the player's Event System
  2. Passes this information through the Target property
  3. Allows instructions to perform player-specific actions

Player Reference

Use the Target property in your instructions to determine which player interacted with the button and perform appropriate actions.

Example Implementation

The module includes a shared menu example that demonstrates:

  • Character selection screen implementation
  • Player-specific UI interactions
  • Proper button configuration

This example serves as a reference for implementing:

  • Lobby systems
  • Character selection screens
  • Shared menu interfaces

Examples Access

Find this example in the Examples section of the Local Multiplayer module installation menu.