using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using static InterfaceManager; public class AddConfing : MonoBehaviour { private void Awake() { string[] datas = ReadFromLocal("IPPort.txt").Split(':'); IP = datas[0]; Port = datas[1]; } public string ReadFromLocal(string fileName) { string path = GetPath(fileName); if (!File.Exists(path)) return "нч"; string data = File.ReadAllText(path); return data; } public string GetPath(string fileName) { string path = Application.streamingAssetsPath + "/" + fileName; return path; } }