// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "asset/AssetManager.hpp" #include "scene/SceneItemComponent.hpp" #include "util/array.hpp" namespace Dawn { template class Prefab { public: /** * Returns the list of assets required for this prefab. * * @param man Asset Manasger for getting required assets from. * @return List of required assets this prefab. */ static std::vector getRequiredAssets(AssetManager *man) { return P::prefabAssets(man); } /** * Creates a new instance of this prefabricated asset. * * @param context Custom context that this prefab needs to initialize. * @return The instance of the created prefab. */ static O * create(J *context) { assertNotNull(context); return P::prefabCreate(context); } }; }