예제 #1
0
        public static MergedTableLoader FromResources(string dataFilePath, string manifestFilePath)
        {
            var data         = Resources.Load <TextAsset>(dataFilePath);
            var manifestText = Resources.Load <TextAsset>(manifestFilePath);
            var manifest     = TableMergeManifest.From(manifestText.text);
            var dataMemory   = new MemoryStream(data.bytes);

            return(new MergedTableLoader(dataMemory, manifest, false));
        }
예제 #2
0
        public static MergedTableLoader FromFile(string dataFilePath, string manifestFilePath)
        {
            var data         = File.ReadAllBytes(dataFilePath);
            var manifestText = File.ReadAllText(manifestFilePath);
            var manifest     = TableMergeManifest.From(manifestText);
            var dataMemory   = new MemoryStream(data);

            return(new MergedTableLoader(dataMemory, manifest, false));
        }
예제 #3
0
 public MergedTableLoader(Stream dataStream, TableMergeManifest mergeManifest, bool leaveStreamOpen = false)
 {
     _stream             = dataStream;
     _tableMergeManifest = mergeManifest;
     _leaveStreamOpen    = leaveStreamOpen;
 }