private Object FindObject(int fileIndex, long pathID, bool isSafe) { if (fileIndex >= m_dependencies.Count) { if (isSafe) { return(null); } throw new Exception($"AssetsFile with index {fileIndex} was not found in dependencies"); } AssetsFilePtr filePtr = m_dependencies[fileIndex]; IAssetsFile file = m_collection.FindAssetsFile(filePtr); if (file == null) { if (isSafe) { return(null); } throw new Exception($"AssetsFile with index {fileIndex} was not found in collection"); } Object @object = file.FindObject(pathID); if (@object == null) { if (isSafe) { return(null); } throw new Exception($"Object with path ID {pathID} was not found"); } return(@object); }
public NativeFormatImporter(Object mainObject) { if (mainObject == null) { throw new ArgumentNullException(nameof(mainObject)); } m_mainObject = mainObject; }
public Object GetObject(long pathID) { Object @object = FindObject(pathID); if (@object == null) { throw new Exception($"Object with path ID {pathID} wasn't found"); } return(@object); }
public ExportPointer CreateExportPointer(Object @object) { return(m_collection.CreateExportPointer(@object)); }
public string GetExportID(Object @object) { return(m_collection.GetExportID(@object)); }
public override IExportCollection CreateCollection(Object @object) { AssetExportCollection collection = new AssetExportCollection(this, @object); return(collection); }