photon
////// The maximum number of players per room. When a room is full, it can't be joined by new players, and so new room will be created. /// [Tooltip("The maximum number of players per room. When a room is full, it can't be joined by new players, and so new room will be created")] [SerializeField] private byte maxPlayersPerRoom = 4;
Here is what the above code is Doing:
1. We’re creating a private variable called maxPlayersPerRoom.
2. We’re setting the value of maxPlayersPerRoom to 4.
3. We’re adding a tooltip to the maxPlayersPerRoom variable.
4. We’re making the maxPlayersPerRoom variable visible in the inspector.
Now, let’s add the following code to the bottom of the Start() method: