public SegmentRange <int> GetCharactersLocationRange(SegmentRange <int> locationRange) { return(new SegmentRange <int>( locationRange.Start == 0 ? 0 : mCharacterPostLocation[locationRange.Start - 1], mCharacterPostLocation[locationRange.End])); }
public Asset CreateIndependentAsset(string path, string name, SegmentRange <int> range, List <Asset> dependentAssets) { //create independent asset(without reference count) //we do not have any reference count for independent asset System.IO.FileStream file = new System.IO.FileStream(path + "/" + name, System.IO.FileMode.Open); byte[] bytes = new byte[range.End - range.Start + 1]; file.Read(bytes, range.Start, bytes.Length); return(mAssetDescriptions[name].CreateIndependentAsset(bytes, dependentAssets)); }
public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range) { //for independent asset, we wiil search the dependent assets //and we will destory the dependent assets after we create independent asset var dependentAssets = SearchDependentAssets(mNodes[description]); var result = description.Package.CreateIndependentAsset(description.Name, range, dependentAssets); foreach (var dependentAsset in dependentAssets) { DestoryAsset(dependentAsset); } return(result); }
public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range) { return(mAssetGraph.CreateIndependentAsset(description, range)); }
internal Asset CreateIndependentAsset(string name, SegmentRange <int> range, List <Asset> dependentAssets) { return(mPackageComponent.CreateIndependentAsset(FullPath, name, range, dependentAssets)); }