private ParseRoomVarManager() { JSONArray roomEntryArr = ParseObjectFactory.GetParseObjectsByColumnValue("Room", "serverConfig", GameManager.Inst.ServerConfig); foreach (JSONValue val in roomEntryArr) { if (val.Obj != null && val.Obj.ContainsKey("name")) { roomEntries[val.Obj.GetValue("name").Str] = val.Obj; } else { Debug.LogError("Entry does not contain name key: " + val.ToString()); } } }
void Start() { if (mInstance != null) { Destroy(mInstance.gameObject); } mInstance = this; #if (UNITY_STANDALONE && SKIP_SEVERCONFIG) || UNITY_WEBPLAYER ParseObject serverconfig = null; #else ParseObject serverconfig = ParseObjectFactory.FindByParseObjectByColumnValue("ServerConfig", "name", serverConfigName); #endif CommunicationManager.Instance.InitializeSmartFoxServer(serverconfig); #if UNITY_STANDALONE && PATCHER_ENABLE guipatcher = this.gameObject.AddComponent <GUIPatcher>(); #endif AddComponents(); initialized = true; }
public bool SetServerConfig(string serverConfigName) { ParseObject serverconfig = string.IsNullOrEmpty(serverConfigName) ? null : ParseObjectFactory.FindByParseObjectByColumnValue("ServerConfig", "name", serverConfigName); return(SetServerConfig(serverconfig)); }