Files
o3de/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceRequestBus.h
T
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00

45 lines
1.5 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/EBus/EBus.h>
#include <AzCore/Math/Transform.h>
#include <AzCore/Slice/SliceComponent.h>
#include <AzCore/Component/Component.h>
#include <AzFramework/Slice/SliceInstantiationTicket.h>
namespace AzToolsFramework
{
//! Bus for making slice requests.
class SliceRequests
: public AZ::EBusTraits
{
public:
virtual ~SliceRequests() {}
//! EBusTraits overrides ...
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
//! Return if a given slice by AssetId is dynamic
virtual bool IsSliceDynamic(const AZ::Data::AssetId& assetId) = 0;
//! Set if a slice asset is dynamic and re-saves the slice
virtual void SetSliceDynamic(const AZ::Data::AssetId& assetId, bool isDynamic) = 0;
//! Instantiate a slice by AssetId at the given transform
virtual AzFramework::SliceInstantiationTicket InstantiateSliceFromAssetId(const AZ::Data::AssetId& assetId, const AZ::Transform& transform) = 0;
//! Create a new slice asset from the given Entity
virtual bool CreateNewSlice(const AZ::EntityId& entityId, const char* assetPath) = 0;
virtual void ShowPushDialog(const EntityIdList& entityIds) = 0;
};
using SliceRequestBus = AZ::EBus<SliceRequests>;
} // namespace AzToolsFramework