- Home /
Question by
zak666 · Jul 25, 2016 at 11:13 AM ·
networkingscriptingbasics
hi guys no idea why I'm getting error CS0117: `UnityEngine.MasterServer' does not contain a definition for `ipAdress'
Hi trying to follow a tutorial on youtube and getting: error CS0117: UnityEngine.MasterServer' does not contain a definition for
ipAdress'
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class Masterserverutills {
public static string uniqueGameType = "_EarthAllianceOnline_GGHFUDUIEDSEJ%34567546745675468";
public static bool useCustomConfigureation = true;
public static string CustromConfigIP = "wouldnt U Like To Know"; //(Server IP HERE)
public static int CustomConfigPort = 23466;
//------------------------------------------------------------------------------
private static void ConfigureMasterServer() {
if (useCustomConfigureation) {
MasterServer.ipAdress = CustromConfigIP;
MasterServer.port = CustomConfigPort;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
public static void RequestHostList () {
ConfigureMasterServer();
MasterServer.RequestHostList(uniqueGameType);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
public static void ListHosts () {
ConfigureMasterServer ();
HostData[] hostData = MasterServer.PollHostList ();
MasterServer.CleartHostList ();
return hostData.ToList ();
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
public static void RegisterWithMasterServer(string gameName,string comment ){
ConfigureMasterServer ();
MasterServer.RegisterHost (uniqueGameType, gameName, comment);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
public static void OnFailedToConnectToMasterServer(NetworkConnectionError info){
Debug.Log ("Unable to Connect To Master Server - " + info);
}
//------------------------------------------------------------------------------
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612085456im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I handle connection errors in a user friendly way? 0 Answers
Unity networking tutorial? 6 Answers
Getting my Actual IP? (not 120.0.0.1) 1 Answer
A simple tutorial to send an email 1 Answer
[Command] not working properly? 0 Answers