예제 #1
0
 public long GetExportID(Object asset)
 {
     if (asset == m_asset)
     {
         return(ExportCollection.GetMainExportID(m_asset));
     }
     throw new ArgumentException(nameof(asset));
 }
예제 #2
0
        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));
        }
예제 #3
0
        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));
            }
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
            }
        }