Exemple #1
0
 public override void ExportBinary(IExportContainer container, Stream stream)
 {
     if (IsReadLoadType(container.Version))
     {
         if (FSBResource.CheckIntegrity(File))
         {
             byte[] data = FSBResource.GetContent(File);
             stream.Write(data, 0, data.Length);
         }
         else
         {
             Logger.Log(LogType.Warning, LogCategory.Export, $"Can't export '{ValidName}' because data can't be read from resources file '{FSBResource.Source}'");
         }
     }
     else
     {
         if (IsReadStreamingInfo(container.Version) && LoadType == AudioClipLoadType.Streaming && m_audioData == null)
         {
             if (StreamingInfo.CheckIntegrity(File))
             {
                 byte[] data = StreamingInfo.GetContent(File);
                 stream.Write(data, 0, data.Length);
             }
             else
             {
                 Logger.Log(LogType.Warning, LogCategory.Export, $"Can't export '{ValidName}' because resources file '{StreamingInfo.Path}' hasn't been found");
             }
         }
         else
         {
             stream.Write(m_audioData, 0, m_audioData.Length);
         }
     }
 }
Exemple #2
0
 public bool CheckAssetIntegrity()
 {
     if (IsReadLoadType(File.Version))
     {
         return(FSBResource.CheckIntegrity(File));
     }
     else if (IsReadStreamingInfo(File.Version))
     {
         if (LoadType == AudioClipLoadType.Streaming)
         {
             if (m_audioData == null)
             {
                 return(StreamingInfo.CheckIntegrity(File));
             }
         }
     }
     return(true);
 }
Exemple #3
0
		public bool CheckAssetIntegrity()
		{
			if (HasLoadType(File.Version))
			{
				return FSBResource.CheckIntegrity(File);
			}
			else if (HasStreamingInfo(File.Version))
			{
				if (LoadType == AudioClipLoadType.Streaming)
				{
					if (AudioData == null)
					{
						return StreamingInfo.CheckIntegrity(File);
					}
				}
			}
			return true;
		}