Skip to content

Commit aa875b1

Browse files
committed
ediotr context for component
Signed-off-by: Wojciech Czerski <[email protected]>
1 parent 35f6a20 commit aa875b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Gems/FPSProfiler/Code/Source/Clients/FPSProfilerComponent.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <Atom/RHI/MemoryStatisticsBuilder.h>
55
#include <Atom/RHI/RHISystemInterface.h>
66
#include <AzCore/IO/FileIO.h>
7+
#include <AzCore/Serialization/EditContext.h>
78
#include <AzCore/Serialization/SerializeContext.h>
89
#include <AzCore/std/numeric.h>
910

@@ -24,6 +25,20 @@ namespace FPSProfiler
2425
->Field("m_configRecord", &FPSProfilerComponent::m_configRecord)
2526
->Field("m_configPrecision", &FPSProfilerComponent::m_configPrecision)
2627
->Field("m_configDebug", &FPSProfilerComponent::m_configDebug);
28+
29+
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
30+
{
31+
editContext->Class<FPSProfilerComponent>("FPS Profiler", "Tracks FPS, GPU and CPU performance and saves it into .csv")
32+
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
33+
->Attribute(AZ::Edit::Attributes::Category, "Performance")
34+
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Level"))
35+
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
36+
37+
->DataElement(AZ::Edit::UIHandlers::Default, &FPSProfilerComponent::m_configFile)
38+
->DataElement(AZ::Edit::UIHandlers::Default, &FPSProfilerComponent::m_configRecord)
39+
->DataElement(AZ::Edit::UIHandlers::Default, &FPSProfilerComponent::m_configPrecision)
40+
->DataElement(AZ::Edit::UIHandlers::Default, &FPSProfilerComponent::m_configDebug);
41+
}
2742
}
2843

2944
// EBus Reflect for Lua and Script Canvas

0 commit comments

Comments
 (0)