Kuizo Documentation
  • Getting Started
    • What is Kuizo?
    • Requirements
    • Installation Instructions
    • Quickstart
  • Using Kuizo
    • Creating and Setting up a new Kuizo Global Settings Object
    • Creating and Managing Categories
    • Creating and Managing Questions
  • Creating and Managing Quizzes
  • Game Settings
    • Configuring the Number of Questions
    • Configuring the Time Limit
    • Configuring the Number of Players
  • Information
    • Contact Me
    • Credits
Powered by GitBook
On this page
  1. Game Settings

Configuring the Number of Players

PreviousConfiguring the Time LimitNextContact Me

Last updated 1 month ago

This setting defines how many players can play and take turns answering questions.

The maximum number of supported players is 8. Increasing this limit will cause unexpected behavior.


How to change the available Number of Players setting

This tutorial requires modifying scripts.

  1. In the Project window, navigate to KamelMahjoub/Kuizo/Scripts/Game Settings.

  2. Locate and open the script named NumberOfPlayers.

  3. Inside the NumberOfPlayers enum, add, remove or comment out values to define the number of players you want your game to support.

    • For example, to make your game support only up to 4 players, modify the enum like this:

public enum NumberOfPlayers
    {
        OnePlayer = 1,
        TwoPlayers = 2,
        ThreePlayers = 3,
        FourPlayers = 4,
    }
  1. Save the script.

  2. Next, locate and open the script named NumberOfPlayersSetting.

  3. Inside the NumberOfPlayersSetting script, locate the method named UpdateOptionText().

  4. Add, remove, or comment out any switch cases to match the values defined in your modified enum.

    • For example, if your NumberOfPlayers enum now only supports up to 4 players, update the method like this:

private void UpdateOptionText()
        {
            optionText.text = selectedOption switch
            {
                NumberOfPlayers.OnePlayer => "1 Player",
                NumberOfPlayers.TwoPlayers => "2 Players",
                NumberOfPlayers.ThreePlayers => "3 Players",
                NumberOfPlayers.FourPlayers => "4 Players",
                _ => "Unknown Player Count"
            };
        }
  1. Save the script.

  2. Return to Unity and let it recompile the changes.