// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors
// SPDX-License-Identifier: Apache-2.0
namespace GLTFast.Addons
{
///
/// Import add-on base class.
///
public abstract class ImportAddon
{
///
/// Creates an import instance that is assigned to a
///
/// GltfImport the import instance is assigned to.
public abstract void CreateImportInstance(GltfImportBase gltfImport);
}
///
/// Extension base class.
///
/// Type of the addon instance, that that is constructed per .
public abstract class ImportAddon : ImportAddon
where TInstance : ImportAddonInstance, new()
{
///
public override void CreateImportInstance(GltfImportBase gltfImport)
{
var instance = new TInstance();
instance.Inject(gltfImport);
}
}
}