data registery + debug

This commit is contained in:
Arnaud Jamin
2023-10-07 02:22:45 -04:00
parent 3e6288c955
commit 02b402023a
3 changed files with 28 additions and 1 deletions
+6
View File
@@ -4,3 +4,9 @@ ProjectName=Third Person Game Template
[/Script/GameplayAbilities.AbilitySystemGlobals] [/Script/GameplayAbilities.AbilitySystemGlobals]
AbilitySystemGlobalsClassName=/Script/CogSample.CogSampleAbilitySystemGlobals AbilitySystemGlobalsClassName=/Script/CogSample.CogSampleAbilitySystemGlobals
[/Script/DataRegistry.DataRegistrySettings]
+DirectoriesToScan=(Path="/Game/Core/Debug/")
bInitializeAllLoadedRegistries=False
bIgnoreMissingCookedAssetRegistryData=False
@@ -30,20 +30,29 @@ void UCogInputWindow_Actions::RenderContent()
{ {
Super::RenderContent(); Super::RenderContent();
if (ActionsAsset == nullptr || ActionsAsset->MappingContext == nullptr) if (ActionsAsset == nullptr)
{ {
ImGui::Text("No Actions Asset");
return;
}
if (ActionsAsset->MappingContext == nullptr)
{
ImGui::Text("No MappingContext");
return; return;
} }
ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController(); ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController();
if (LocalPlayer == nullptr) if (LocalPlayer == nullptr)
{ {
ImGui::Text("No Local Player");
return; return;
} }
UEnhancedInputLocalPlayerSubsystem* EnhancedInputSubsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(LocalPlayer); UEnhancedInputLocalPlayerSubsystem* EnhancedInputSubsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(LocalPlayer);
if (EnhancedInputSubsystem == nullptr) if (EnhancedInputSubsystem == nullptr)
{ {
ImGui::Text("No Enhanced Input Subsystem");
return; return;
} }
@@ -172,24 +172,28 @@ void UCogInputWindow_Gamepad::RenderContent()
if (GetWorld() == nullptr) if (GetWorld() == nullptr)
{ {
ImGui::Text("No World");
return; return;
} }
ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController(); ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController();
if (LocalPlayer == nullptr) if (LocalPlayer == nullptr)
{ {
ImGui::Text("No Local Player");
return; return;
} }
UEnhancedInputLocalPlayerSubsystem* EnhancedInputSubsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(LocalPlayer); UEnhancedInputLocalPlayerSubsystem* EnhancedInputSubsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(LocalPlayer);
if (EnhancedInputSubsystem == nullptr) if (EnhancedInputSubsystem == nullptr)
{ {
ImGui::Text("No Enhanced Input Subsystem");
return; return;
} }
Input = EnhancedInputSubsystem->GetPlayerInput(); Input = EnhancedInputSubsystem->GetPlayerInput();
if (Input == nullptr) if (Input == nullptr)
{ {
ImGui::Text("No Player Input");
return; return;
} }
@@ -233,6 +237,14 @@ void UCogInputWindow_Gamepad::RenderContent()
} }
} }
} }
else
{
ImGui::Text("No Actions in Action Asset");
}
}
else
{
ImGui::Text("No Action Asset");
} }
const float AspectRatio = 0.55f; const float AspectRatio = 0.55f;