Пример #1
0
    // Use this for initialization
    void Start()
    {
        TestProtoClass test = new TestProtoClass();

        test.dependenies = new List <string>()
        {
            "123",
            "asd",
            "zxc",
            "dfg"
        };

        var bytes         = ProtoEx.Serialize(test);
        var testFromProto = ProtoEx.DeSerialize <TestProtoClass>(bytes);

        Debug.Log(testFromProto.dependenies.ConverToString());
    }
Пример #2
0
 //获取值
 public T GetValue <T>()
 {
     return(ProtoEx.DeSerialize <T>(data));
 }