Beispiel #1
0
 void Start()
 {
     _CHChatSocket = CHChatSocket.instance;
     UIManager.ShowPanel(PanelType.PanelMain);
     XmlPath = Application.dataPath + "/data.xml";
     ReadXMl();
 }
Beispiel #2
0
    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>();
    }