コード例 #1
0
ファイル: Persistence.cs プロジェクト: kutselabskii/Citrus
 public void WriteObjectToBundle <T>(AssetBundle bundle, string path, T instance, Format format, string sourceExtension, DateTime time, AssetAttributes attributes, byte[] cookingRulesSHA1)
 {
     using (MemoryStream stream = new MemoryStream()) {
         WriteObject(path, stream, instance, format);
         stream.Seek(0, SeekOrigin.Begin);
         bundle.ImportFile(path, stream, 0, sourceExtension, time, attributes, cookingRulesSHA1);
     }
 }
コード例 #2
0
 public override void ImportFile(string path, Stream stream, int reserve, string sourceExtension, DateTime time, AssetAttributes attributes, byte[] cookingRulesSHA1)
 {
     Bundle.ImportFile(path, stream, reserve, sourceExtension, time, attributes, cookingRulesSHA1);
 }