b4a2edec6a
* 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>
41 lines
1.6 KiB
C++
41 lines
1.6 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/RTTI/RTTI.h>
|
|
|
|
#include <AssetBuilderSDK/AssetBuilderBusses.h>
|
|
#include <AssetBuilderSDK/AssetBuilderSDK.h>
|
|
|
|
namespace CustomAssetExample
|
|
{
|
|
//! Here is an example of a builder worker that actually performs the building of assets.
|
|
//! In this example, we only register one, but you can have as many different builders in a single builder module as you want.
|
|
class ExampleBuilderWorker
|
|
: public AssetBuilderSDK::AssetBuilderCommandBus::Handler // this will deliver you the "shut down!" message on another thread.
|
|
{
|
|
public:
|
|
AZ_RTTI(ExampleBuilderWorker, "{C163F950-BF25-4D60-90D7-8E181E25A9EA}");
|
|
|
|
ExampleBuilderWorker() = default;
|
|
~ExampleBuilderWorker() = default;
|
|
|
|
//! Asset Builder Callback Functions
|
|
void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response);
|
|
void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//!AssetBuilderSDK::AssetBuilderCommandBus interface
|
|
void ShutDown() override; // if you get this you must fail all existing jobs and return.
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
private:
|
|
bool m_isShuttingDown = false;
|
|
};
|
|
}
|