Exemplo n.º 1
0
    void testJson2()
    {
        TextAsset bindata = Resources.Load("configjson/AccessPathTable") as TextAsset;

        ConfigMgr.getInstance().initConfig <AccessPathTableProperty, AccessPathTableObject>("AccessPathTable", "AccessPathTable", "id");

        AccessPathTableObject t = ConfigMgr.getInstance().getObjectConfig <AccessPathTableObject>("2");

        //AccessPathTable table = JsonUtility.FromJson<AccessPathTable>(bindata.ToString());
        //Debug.Log("" + table.itemID);
    }
Exemplo n.º 2
0
        public override string test()
        {
            Debug.Log("TestJsonDelegate Test\n");
            TextAsset bindata = Resources.Load("configjson/AccessPathTable") as TextAsset;

            ConfigMgr.getInstance().initConfig <AccessPathTableProperty, AccessPathTableObject>("AccessPathTable", "AccessPathTable", "id");
            AccessPathTableObject t = ConfigMgr.getInstance().getObjectConfig <AccessPathTableObject>("2");

            string s = "Json解析测试";

            s += "Chapter:" + t.chapter + "\n";
            s += "Desc:" + t.desc + "\n";
            s += "Icon:" + t.icon + "\n";
            s += "Id:" + t.id + "\n";
            s += "Remark:" + t.remark + "\n";
            s += "Title:" + t.title + "\n";

            return(s);
        }