//Protobuffer从MemoryStream进行反序列化
    public bool FromMemoryStream(MemoryStream protoMS)
    {
        MMOMapDataPortalInfoV1 pb = ProtoBuf.Serializer.Deserialize <MMOMapDataPortalInfoV1>(protoMS);

        FromPB(pb);
        return(true);
    }
 //从Protobuffer类型初始化
 public void FromPB(MMOMapDataPortalInfoV1 v)
 {
     if (v == null)
     {
         return;
     }
     m_SourcePos.FromPB(v.SourcePos);
     m_TargetPos.FromPB(v.TargetPos);
     m_TargetRot.FromPB(v.TargetRot);
     m_TargetDungeonID  = v.TargetDungeonID;
     m_TargetSpawnIndex = v.TargetSpawnIndex;
     m_PortalType       = v.PortalType;
 }
    //转化成Protobuffer类型函数
    public MMOMapDataPortalInfoV1 ToPB()
    {
        MMOMapDataPortalInfoV1 v = new MMOMapDataPortalInfoV1();

        v.SourcePos        = m_SourcePos.ToPB();
        v.TargetPos        = m_TargetPos.ToPB();
        v.TargetRot        = m_TargetRot.ToPB();
        v.TargetDungeonID  = m_TargetDungeonID;
        v.TargetSpawnIndex = m_TargetSpawnIndex;
        v.PortalType       = m_PortalType;

        return(v);
    }