48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | ||
| using System.Collections;
 | ||
| using System.Collections.Generic;
 | ||
| using UnityEngine;
 | ||
| using UnityEngine.Networking;
 | ||
| using Utility;
 | ||
| //============================================================
 | ||
| //支持中文,文件使用UTF-8编码
 | ||
| //@author	YangHua
 | ||
| //@create	20230920
 | ||
| //@company	Adam
 | ||
| //
 | ||
| //@description:
 | ||
| //============================================================
 | ||
| namespace Adam
 | ||
| {
 | ||
|     public class WebIPAdress : MonoSingleton<WebIPAdress>
 | ||
|     {
 | ||
|         public Dictionary<string, string> dicAdresses = new Dictionary<string, string>();
 | ||
|         public string[] _allLine;
 | ||
| 
 | ||
|         // Use this for initialization
 | ||
|         private void Awake()
 | ||
|         {
 | ||
|             _allLine = FileUtil.ReadAllLineFromLocal("端口配置.txt");
 | ||
| 
 | ||
|             for (int i = 0; i < _allLine.Length; i++)
 | ||
|             {
 | ||
|                 string[] info = ToolUtility.GetInfos(_allLine[i], ',');
 | ||
|                 dicAdresses.Add(info[0], info[1]);
 | ||
|             }
 | ||
|         }
 | ||
|     }
 | ||
| 
 | ||
|     [Serializable]
 | ||
|     public class Info
 | ||
|     {
 | ||
|         public WebIPAdressInfo[] adresses;
 | ||
|     }
 | ||
| 
 | ||
|     [Serializable]
 | ||
|     public class WebIPAdressInfo
 | ||
|     {
 | ||
|         public string name;
 | ||
|         public string url;
 | ||
|     }
 | ||
| }
 |