/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include "Asset/WhiteBoxMeshAsset.h" #include "Asset/WhiteBoxMeshAssetHandler.h" #include "EditorWhiteBoxSystemComponent.h" #include "WhiteBoxToolApiReflection.h" #include namespace WhiteBox { void EditorWhiteBoxSystemComponent::Reflect(AZ::ReflectContext* context) { if (auto serialize = azrtti_cast(context)) { serialize->Class()->Version(1); } WhiteBox::Reflect(context); } template void RegisterAsset(AZStd::vector>& assetHandlers) { AZ::Data::AssetCatalogRequestBus::Broadcast( &AZ::Data::AssetCatalogRequests::EnableCatalogForAsset, AZ::AzTypeInfo::Uuid()); AZ::Data::AssetCatalogRequestBus::Broadcast( &AZ::Data::AssetCatalogRequests::AddExtension, AssetHandlerT::AssetFileExtension); assetHandlers.emplace_back(AZStd::make_unique()); } void EditorWhiteBoxSystemComponent::Activate() { WhiteBoxSystemComponent::Activate(); RegisterAsset(m_assetHandlers); } void EditorWhiteBoxSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) { dependent.push_back(AZ_CRC_CE("AssetDatabaseService")); } } // namespace WhiteBox