void Start() { _CHChatSocket = CHChatSocket.instance; UIManager.ShowPanel(PanelType.PanelMain); XmlPath = Application.dataPath + "/data.xml"; ReadXMl(); }
private static void CreateInstance() { string name = typeof(CHSocket).ToString(); GameObject obj = UnityEngine.GameObject.Find(name); if (obj == null) { obj = new GameObject(name); UnityEngine.Object.DontDestroyOnLoad(obj); } _instance = obj.AddComponent <CHChatSocket>(); }