Esempio n. 1
0
    private void ParseUIPanelTypeJson()
    {
        TextAsset       ta   = Resources.Load <TextAsset>("UIPanelType");
        UIPanelInfoList temp = JsonUtility.FromJson <UIPanelInfoList>(ta.text);

        //填充字典
        for (int index = 0; index < temp.PanelList.Count; index++)
        {
            panelPathPairs.Add(temp.PanelList[index].PanelType, temp.PanelList[index].path);
        }
    }
Esempio n. 2
0
    //解析json文件
    private void ParseUIPanelTypeJson()
    {
        panelPathDict = new Dictionary <string, string>();
        TextAsset       textUIPanelType = Resources.Load <TextAsset>("UIPanelTypeJson");
        UIPanelInfoList panelInfoList   = JsonMapper.ToObject <UIPanelInfoList>(textUIPanelType.text);

        foreach (UIPanelInfo panelInfo in panelInfoList.panelInfoList)
        {
            panelPathDict.Add(panelInfo.panelType, panelInfo.path);
            //Debug.Log(panelInfo.panelType + ":" + panelInfo.path);
        }
    }
Esempio n. 3
0
    //解析json文件
    private void ParseUIPanelTypeJson()
    {
        panelPathDict = new Dictionary <string, string>();

        UIPanelInfoList panelInfoList = new UIPanelInfoList()
        {
            panelInfoList = JsonDataTool.GetListFromJson <UIPanelInfo>(appSetting.UIPanelTypeTableName)
        };

        foreach (UIPanelInfo panelInfo in panelInfoList.panelInfoList)
        {
            panelPathDict.Add(panelInfo.panelType, panelInfo.path);
            //Debug.Log(panelInfo.panelType + ":" + panelInfo.path);
        }
    }