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
- Add the
Button (Multiplayer)
component to a GameObject - Add a UI Image component (required for button functionality)
- Configure standard Unity button settings as normal
- Set up your instructions using Target to reference the interacting player
How It Works
When a player interacts with the button:
- The component identifies the player's Event System
- Passes this information through the Target property
- 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.