49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "WingServer.h"
|
|
#include "WingHandler.h"
|
|
#include "WingFactories.h"
|
|
#include "SysInfo_Factories.generated.h"
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
|
UCLASS()
|
|
class UWing_SysInfo_Factories : public UWingHandler
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void Register() override
|
|
{
|
|
UWingServer::AddHandler(this,
|
|
TEXT("Sysinfo commands are intended for the human who "
|
|
"is developing this plugin, they help him to understand. "
|
|
"unreal's internals better."));
|
|
}
|
|
virtual void Handle() override
|
|
{
|
|
const TArray<UWingFactories::Info>& All = UWingFactories::AllFactories();
|
|
|
|
for (int nparam = 0; nparam < 10; nparam++)
|
|
{
|
|
for (const UWingFactories::Info& Entry : All)
|
|
{
|
|
if (Entry.Config.Num() != nparam) continue;
|
|
if (!Entry.CanCreateNew()) continue;
|
|
UWingServer::Printf(TEXT("%s"), *Entry.Name);
|
|
|
|
for (const FName& Prop : Entry.Config)
|
|
{
|
|
UWingServer::Printf(TEXT(" PARAM: %s"), *Prop.ToString());
|
|
}
|
|
UWingServer::Printf(TEXT("\n"));
|
|
}
|
|
UWingServer::Printf(TEXT("\n"));
|
|
}
|
|
}
|
|
};
|