97a053a540
This is the initial Terrain Gem. In this PR, it doesn't do anything, but it contains all of the initial code, icons, and build scripts for the gem to compile and build successfully. The follow-up PR will contain the first round of functioning code. Also, with the creation of the gem, the TerrainSurfaceDataSystemComponent is getting relocated from the SurfaceData Gem to the Terrain Gem. This should have no impact, as that component has provided no active functionality in o3de. (It will start working again with the initial terrain system code in the next PR) This also adds a couple of null guards to prefab code to prevent AP crashes, and fixed an incorrect service dependency in the VegetationSystemComponent that was exposed by moving the TerrainSurfaceDataSystemComponent. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
69 lines
2.1 KiB
C++
69 lines
2.1 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
|
|
*
|
|
*/
|
|
|
|
|
|
#include <Components/TerrainSystemComponent.h>
|
|
|
|
#include <AzCore/Serialization/SerializeContext.h>
|
|
#include <AzCore/Serialization/EditContext.h>
|
|
#include <AzCore/Serialization/EditContextConstants.inl>
|
|
|
|
#include <Atom/RPI.Public/FeatureProcessorFactory.h>
|
|
|
|
namespace Terrain
|
|
{
|
|
void TerrainSystemComponent::Reflect(AZ::ReflectContext* context)
|
|
{
|
|
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
|
|
{
|
|
serialize->Class<TerrainSystemComponent, AZ::Component>()
|
|
->Version(0);
|
|
|
|
if (AZ::EditContext* ec = serialize->GetEditContext())
|
|
{
|
|
ec->Class<TerrainSystemComponent>("Terrain", "The Terrain System Component enables Terrain.")
|
|
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
|
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
|
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
|
;
|
|
}
|
|
}
|
|
}
|
|
|
|
void TerrainSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
|
{
|
|
provided.push_back(AZ_CRC_CE("TerrainService"));
|
|
}
|
|
|
|
void TerrainSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
|
{
|
|
incompatible.push_back(AZ_CRC_CE("TerrainService"));
|
|
}
|
|
|
|
void TerrainSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
|
|
{
|
|
required.push_back(AZ_CRC_CE("RPISystem"));
|
|
}
|
|
|
|
void TerrainSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
|
|
{
|
|
}
|
|
|
|
void TerrainSystemComponent::Init()
|
|
{
|
|
}
|
|
|
|
void TerrainSystemComponent::Activate()
|
|
{
|
|
}
|
|
|
|
void TerrainSystemComponent::Deactivate()
|
|
{
|
|
}
|
|
}
|