// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#if COMPILE_WITH_ASSETS_EXPORTER
#include "Types.h"
#include "Engine/Core/Collections/Dictionary.h"
///
/// Assets Importing service allows to import or create new assets
///
class FLAXENGINE_API AssetsExportingManager
{
public:
///
/// The asset exporting callbacks. Identified by the asset typename.
///
static Dictionary Exporters;
public:
///
/// Gets the asset export for thee given asset typename.
///
/// The asset typename.
/// Exporter or null if not found.
static const ExportAssetFunction* GetExporter(const String& typeName);
///
/// Checks if the asset at the given location can be exports.
///
/// The input asset path.
/// True if can export it, otherwise false.
static bool CanExport(const String& inputPath);
public:
///
/// Exports the asset.
///
/// The input asset path.
/// The output path.
/// The custom argument.
/// True if fails, otherwise false.
static bool Export(const String& inputPath, const String& outputFolder, void* arg = nullptr);
///
/// Exports the asset.
///
/// The custom callback.
/// The input asset path.
/// The output path.
/// The custom argument.
/// True if fails, otherwise false.
static bool Export(const ExportAssetFunction& callback, const String& inputPath, const String& outputFolder, void* arg = nullptr);
};
#endif