Exemplo n.º 1
0
 public void Load(AssetReader reader, string version)
 {
     if (version != "2017.3.1f1")
     {
         Load(reader);
         if (0 == m_DataLength && version.StartsWith("2017."))  // "2017.2.0f3" || "2017.1.1p1"
         {
             reader.ReadInt64();
         }
         return;
     }
     m_Name = reader.ReadString();
     reader.Align();
     reader.ReadInt32(); // m_ForcedFallbackFormat
     reader.ReadInt32(); // m_DownscaleFallback
     m_Width             = reader.ReadInt32();
     m_Height            = reader.ReadInt32();
     m_CompleteImageSize = reader.ReadInt32();
     m_TextureFormat     = (TextureFormat)reader.ReadInt32();
     m_MipCount          = reader.ReadInt32();
     m_IsReadable        = reader.ReadBool();
     reader.Align();
     m_ImageCount       = reader.ReadInt32();
     m_TextureDimension = reader.ReadInt32();
     m_FilterMode       = reader.ReadInt32();
     m_Aniso            = reader.ReadInt32();
     m_MipBias          = reader.ReadFloat();
     m_WrapMode         = reader.ReadInt32(); // m_WrapU
     reader.ReadInt32();                      // m_WrapV
     reader.ReadInt32();                      // m_WrapW
     reader.ReadInt32();                      // m_LightmapFormat
     m_ColorSpace = reader.ReadInt32();
     m_DataLength = reader.ReadInt32();
 }
Exemplo n.º 2
0
 public void Load(AssetReader reader)
 {
     m_Name = reader.ReadString();
     reader.Align();
     m_Width             = reader.ReadInt32();
     m_Height            = reader.ReadInt32();
     m_CompleteImageSize = reader.ReadInt32();
     m_TextureFormat     = (TextureFormat)reader.ReadInt32();
     m_MipCount          = reader.ReadInt32();
     if (reader.Format > 9)
     {
         m_IsReadable  = reader.ReadBool();
         m_ReadAllowed = reader.ReadBool();
         reader.Align();
     }
     m_ImageCount       = reader.ReadInt32();
     m_TextureDimension = reader.ReadInt32();
     m_FilterMode       = reader.ReadInt32();
     m_Aniso            = reader.ReadInt32();
     m_MipBias          = reader.ReadFloat();
     m_WrapMode         = reader.ReadInt32();
     m_LightFormat      = reader.ReadInt32();
     m_ColorSpace       = reader.ReadInt32();
     m_DataLength       = reader.ReadInt32();
 }
Exemplo n.º 3
0
 public void Load2021(AssetReader reader)
 {
     m_Name = reader.ReadString();
     reader.Align();
     reader.ReadInt32(); // m_ForcedFallbackFormat
     reader.ReadInt32(); // m_DownscaleFallback
     m_Width             = reader.ReadInt32();
     m_Height            = reader.ReadInt32();
     m_CompleteImageSize = reader.ReadInt32();
     reader.ReadInt32(); // m_MipsStripped;
     m_TextureFormat = (TextureFormat)reader.ReadInt32();
     m_MipCount      = reader.ReadInt32();
     m_IsReadable    = reader.ReadBool();
     reader.Align();
     reader.ReadInt32(); // m_StreamingMipmapsPriority
     m_ImageCount       = reader.ReadInt32();
     m_TextureDimension = reader.ReadInt32();
     m_FilterMode       = reader.ReadInt32();
     m_Aniso            = reader.ReadInt32();
     m_MipBias          = reader.ReadFloat();
     m_WrapMode         = reader.ReadInt32(); // m_WrapU
     reader.ReadInt32();                      // m_WrapV
     reader.ReadInt32();                      // m_WrapW
     reader.ReadInt32();                      // m_LightmapFormat
     m_ColorSpace = reader.ReadInt32();
     reader.ReadInt32();
     m_DataLength = reader.ReadInt32();
 }
Exemplo n.º 4
0
 public void Load(AssetReader reader)
 {
     m_Name = reader.ReadString();
     reader.Align();
     m_LoadType        = reader.ReadInt32();
     m_Channels        = reader.ReadInt32();
     m_Frequency       = reader.ReadInt32();
     m_BitsPerSample   = reader.ReadInt32();
     m_Length          = reader.ReadFloat();
     m_IsTrackerFormat = reader.ReadBool();
     reader.Align();
     m_SubsoundIndex    = reader.ReadInt32();
     m_PreloadAudioData = reader.ReadBool();
     m_LoadInBackground = reader.ReadBool();
     m_Legacy3D         = reader.ReadBool();
     reader.Align();
     m_Source = reader.ReadString();
     reader.Align();
     m_Offset            = reader.ReadInt64();
     m_Size              = reader.ReadInt64();
     m_CompressionFormat = reader.ReadInt32();
 }
Exemplo n.º 5
0
 public void Load(AssetReader reader, UnityTypeData type)
 {
     if ("2021.1.3f1" == type.Version) // type.Hashes[28] == [0D 08 41 4C FD 5B DB 0D 22 79 20 11 BD A9 AB 26]
     {
         Load2021(reader);
         return;
     }
     if (type.Version != "2017.3.1f1")
     {
         Load(reader);
         if (0 == m_DataLength && type.Version.StartsWith("2017."))  // "2017.2.0f3" || "2017.1.1p1"
         {
             reader.ReadInt64();
         }
         return;
     }
     m_Name = reader.ReadString();
     reader.Align();
     reader.ReadInt32(); // m_ForcedFallbackFormat
     reader.ReadInt32(); // m_DownscaleFallback
     m_Width             = reader.ReadInt32();
     m_Height            = reader.ReadInt32();
     m_CompleteImageSize = reader.ReadInt32();
     m_TextureFormat     = (TextureFormat)reader.ReadInt32();
     m_MipCount          = reader.ReadInt32();
     m_IsReadable        = reader.ReadBool();
     reader.Align();
     m_ImageCount       = reader.ReadInt32();
     m_TextureDimension = reader.ReadInt32();
     m_FilterMode       = reader.ReadInt32();
     m_Aniso            = reader.ReadInt32();
     m_MipBias          = reader.ReadFloat();
     m_WrapMode         = reader.ReadInt32(); // m_WrapU
     reader.ReadInt32();                      // m_WrapV
     reader.ReadInt32();                      // m_WrapW
     reader.ReadInt32();                      // m_LightmapFormat
     m_ColorSpace = reader.ReadInt32();
     m_DataLength = reader.ReadInt32();
 }