public long GetExportID(Object asset) { if (asset == m_asset) { return(ExportCollection.GetMainExportID(m_asset)); } throw new ArgumentException(nameof(asset)); }
public ExportPointer CreateExportPointer(Object asset) { if (m_assetCollections.TryGetValue(asset, out IExportCollection collection)) { return(collection.CreateExportPointer(asset, collection == CurrentCollection)); } if (Config.IsExportDependencies) { //throw new InvalidOperationException($"Object {asset} wasn't found in any export collection"); } long exportID = ExportCollection.GetMainExportID(asset); return(new ExportPointer(exportID, EngineGUID.MissingReference, AssetType.Meta)); }
public long GetExportID(Object asset) { if (m_assetCollections.TryGetValue(asset, out IExportCollection collection)) { return(collection.GetExportID(asset)); } if (Config.IsExportDependencies) { throw new InvalidOperationException($"Object {asset} wasn't found in any export collection"); } else { return(ExportCollection.GetMainExportID(asset)); } }
public ExportPointer CreateExportPointer(Object asset) { if (CurrentCollection.IsContains(asset)) { return(CurrentCollection.CreateExportPointer(asset, true)); } foreach (IExportCollection collection in m_collections) { if (collection.IsContains(asset)) { return(collection.CreateExportPointer(asset, false)); } } if (Config.IsExportDependencies) { //throw new InvalidOperationException($"Object {asset} wasn't found in any export collection"); } long exportID = ExportCollection.GetMainExportID(asset); return(new ExportPointer(exportID, EngineGUID.MissingReference, AssetType.Meta)); }
public long GetExportID(Object asset) { if (CurrentCollection.IsContains(asset)) { return(CurrentCollection.GetExportID(asset)); } foreach (IExportCollection collection in m_collections) { if (collection.IsContains(asset)) { return(collection.GetExportID(asset)); } } if (Config.IsExportDependencies) { throw new InvalidOperationException($"Object {asset} wasn't found in any export collection"); } else { return(ExportCollection.GetMainExportID(asset)); } }