Question by
tddebart · Jan 22, 2018 at 04:09 PM ·
unity 5uimethodnot showing
method not showing up in on value changed in a RoomNameInput
the SetRoomSize method is not shown, but SetRoomName is displayed. can somebody tell me why and how i fix it http://prntscr.com/i3zv33
using UnityEngine; using UnityEngine.Networking;
public class HostGame : MonoBehaviour {
[SerializeField]
private uint roomSize = 6;
private string roomName;
private NetworkManager networkManager;
void Start()
{
networkManager = NetworkManager.singleton;
if (networkManager.matchMaker == null)
{
networkManager.StartMatchMaker();
}
}
public void SetRoomName(string _name)
{
roomName = _name;
}
public void SetRoomSize(uint _size)
{
roomSize = _size;
}
public void CreateRoom()
{
if (roomName != "" && roomName != null)
{
Debug.Log("Creating Room: " + roomName + " with room for " + roomSize + " players.");
networkManager.matchMaker.CreateMatch(roomName, roomSize, true, "", "", "", 0, 0, networkManager.OnMatchCreate);
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Control ScrollView with arrow keys? 3 Answers
Changing the UI Text 0 Answers
UI Text: Words at end of line jumping to next line 0 Answers