Exemplo n.º 1
0
        public AssetHeader(Stream stream)
        {
            using (var br = new BinaryReader(stream, Encoding.Unicode, true))
            {
                m_EngineVersion = (AssetUtil.EngineVersion)br.ReadUInt64();

                var b_name      = new byte[NAME_LENGTH];
                var b_namespace = new byte[NAME_LENGTH];

                br.Read(b_name, 0, b_name.Length);
                br.Read(b_namespace, 0, b_namespace.Length);

                m_Name      = Encoding.ASCII.GetString(b_name).Replace("\0", "");
                m_Namespace = Encoding.ASCII.GetString(b_namespace).Replace("\0", "");
            }
        }
Exemplo n.º 2
0
 public AssetHeader(AssetUtil.EngineVersion engineVersion, string name, string nameSpace)
 {
     EngineVersion = engineVersion;
     Name          = name;
     Namespace     = nameSpace;
 }