Files
o3de/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicRequestHandler.h
T
chiyenteng 7e5cbdab1e Create a new automated test for Prefab basic workflows (#2715)
Adds a new ebus for prefab apis and refactored the apis
Removed an empty test level
Auto delete tmp level when teardown tests
Add Base test level in Prefab folder
Removed unused comments
Checked if absolute path as an input of Create Prefab functions
Changed created prefab file path to support all platfroms
Added missing includes

Signed-off-by: chiyteng <chiyteng@amazon.com>
2021-08-11 14:11:26 -07:00

42 lines
1.3 KiB
C++

/*
* 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
*
*/
#pragma once
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/RTTI/RTTI.h>
#include <AzToolsFramework/Prefab/PrefabPublicRequestBus.h>
namespace AzToolsFramework
{
namespace Prefab
{
class PrefabPublicInterface;
class PrefabPublicRequestHandler final
: public PrefabPublicRequestBus::Handler
{
public:
AZ_CLASS_ALLOCATOR(PrefabPublicRequestHandler, AZ::SystemAllocator, 0);
AZ_RTTI(PrefabPublicRequestHandler, "{83FBDDF9-10BE-4373-B1DC-44B47EE4805C}");
static void Reflect(AZ::ReflectContext* context);
void Connect();
void Disconnect();
bool CreatePrefabInMemory(const AZStd::vector<AZ::EntityId>& entityIds, AZStd::string_view filePath) override;
AZ::EntityId InstantiatePrefab(AZStd::string_view filePath, AZ::EntityId parent, const AZ::Vector3& position) override;
private:
PrefabPublicInterface* m_prefabPublicInterface = nullptr;
};
} // namespace Prefab
} // namespace AzToolsFramework