mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-04 06:38:45 +00:00
starting to add AI windows
This commit is contained in:
@@ -12,3 +12,16 @@ GlobalGameplayCueManagerClass=/Script/CogSample.CogSampleGameplayCueManager
|
|||||||
bInitializeAllLoadedRegistries=False
|
bInitializeAllLoadedRegistries=False
|
||||||
bIgnoreMissingCookedAssetRegistryData=False
|
bIgnoreMissingCookedAssetRegistryData=False
|
||||||
|
|
||||||
|
[/Script/Engine.AssetManagerSettings]
|
||||||
|
-PrimaryAssetTypesToScan=(PrimaryAssetType="Map",AssetBaseClass=/Script/Engine.World,bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game/Maps")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||||
|
-PrimaryAssetTypesToScan=(PrimaryAssetType="PrimaryAssetLabel",AssetBaseClass=/Script/Engine.PrimaryAssetLabel,bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||||
|
+PrimaryAssetTypesToScan=(PrimaryAssetType="Map",AssetBaseClass="/Script/Engine.World",bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game/Maps")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||||
|
+PrimaryAssetTypesToScan=(PrimaryAssetType="PrimaryAssetLabel",AssetBaseClass="/Script/Engine.PrimaryAssetLabel",bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||||
|
+PrimaryAssetTypesToScan=(PrimaryAssetType="Cog",AssetBaseClass="/Script/Engine.PrimaryDataAsset",bHasBlueprintClasses=False,bIsEditorOnly=False,Directories=((Path="/Game/Core/Debug/")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=DevelopmentAlwaysCook))
|
||||||
|
bOnlyCookProductionAssets=False
|
||||||
|
bShouldManagerDetermineTypeAndName=False
|
||||||
|
bShouldGuessTypeAndNameInEditor=True
|
||||||
|
bShouldAcquireMissingChunksOnLoad=False
|
||||||
|
bShouldWarnAboutInvalidAssets=True
|
||||||
|
MetaDataTagsForAssetRegistry=()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"FileVersion": 3,
|
||||||
|
"Version": 1,
|
||||||
|
"VersionName": "1.0",
|
||||||
|
"FriendlyName": "CogAI",
|
||||||
|
"Description": "",
|
||||||
|
"Category": "Other",
|
||||||
|
"CreatedBy": "Arnaud Jamin",
|
||||||
|
"CreatedByURL": "",
|
||||||
|
"DocsURL": "",
|
||||||
|
"MarketplaceURL": "",
|
||||||
|
"SupportURL": "",
|
||||||
|
"CanContainContent": true,
|
||||||
|
"IsBetaVersion": false,
|
||||||
|
"IsExperimentalVersion": false,
|
||||||
|
"Installed": false,
|
||||||
|
"Modules": [
|
||||||
|
{
|
||||||
|
"Name": "CogAI",
|
||||||
|
"Type": "Runtime",
|
||||||
|
"LoadingPhase": "Default"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Plugins": [
|
||||||
|
{
|
||||||
|
"Name": "Cog",
|
||||||
|
"Enabled": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class CogAI : ModuleRules
|
||||||
|
{
|
||||||
|
public CogAI(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
|
PublicIncludePaths.AddRange(
|
||||||
|
new string[] {
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
PrivateIncludePaths.AddRange(
|
||||||
|
new string[] {
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
PublicDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"Core",
|
||||||
|
"CogImgui",
|
||||||
|
"CogDebug",
|
||||||
|
"CogWindow",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
PrivateDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"CoreUObject",
|
||||||
|
"Engine",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
DynamicallyLoadedModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#include "CogAIModule.h"
|
||||||
|
|
||||||
|
#define LOCTEXT_NAMESPACE "FCogAIModule"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void FCogAIModule::StartupModule()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void FCogAIModule::ShutdownModule()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
|
|
||||||
|
IMPLEMENT_MODULE(FCogAIModule, CogAI)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#include "CogAIWindow_Blackboard.h"
|
||||||
|
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void UCogAIWindow_Blackboard::RenderHelp()
|
||||||
|
{
|
||||||
|
ImGui::Text(
|
||||||
|
"This window displays the blackboard of the selected actor. "
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
UCogAIWindow_Blackboard::UCogAIWindow_Blackboard()
|
||||||
|
{
|
||||||
|
bHasMenu = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void UCogAIWindow_Blackboard::RenderContent()
|
||||||
|
{
|
||||||
|
Super::RenderContent();
|
||||||
|
|
||||||
|
if (ImGui::BeginTable("Actions", 3, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize))
|
||||||
|
{
|
||||||
|
ImGui::TableSetupColumn("Action", ImGuiTableColumnFlags_WidthFixed);
|
||||||
|
ImGui::TableSetupColumn("Value", ImGuiTableColumnFlags_WidthStretch);
|
||||||
|
ImGui::TableSetupColumn("Inject", ImGuiTableColumnFlags_WidthStretch);
|
||||||
|
ImGui::TableHeadersRow();
|
||||||
|
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "CogAIDataAsset.generated.h"
|
||||||
|
|
||||||
|
UCLASS(Blueprintable)
|
||||||
|
class COGAI_API UCogAIDataAsset : public UPrimaryDataAsset
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UCogAIDataAsset() {}
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Modules/ModuleManager.h"
|
||||||
|
|
||||||
|
class COGAI_API FCogAIModule : public IModuleInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static inline FCogAIModule& Get()
|
||||||
|
{
|
||||||
|
return FModuleManager::LoadModuleChecked<FCogAIModule>("CogAI");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IModuleInterface implementation */
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "CogWindow.h"
|
||||||
|
#include "CogAIWindow_Blackboard.generated.h"
|
||||||
|
|
||||||
|
class UCogAIDataAsset;
|
||||||
|
|
||||||
|
UCLASS(Config = Cog)
|
||||||
|
class COGAI_API UCogAIWindow_Blackboard : public UCogWindow
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UCogAIWindow_Blackboard();
|
||||||
|
|
||||||
|
//const UCogAIDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
//void SetAsset(const UCogAIDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void RenderHelp();
|
||||||
|
|
||||||
|
virtual void RenderContent() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
//UPROPERTY()
|
||||||
|
//TWeakObjectPtr<const UCogAIDataAsset> Asset = nullptr;
|
||||||
|
};
|
||||||
@@ -28,8 +28,9 @@ public class CogSample : ModuleRules
|
|||||||
"CogImgui",
|
"CogImgui",
|
||||||
"CogWindow",
|
"CogWindow",
|
||||||
"CogEngine",
|
"CogEngine",
|
||||||
"CogInput",
|
|
||||||
"CogAbility",
|
"CogAbility",
|
||||||
|
"CogAI",
|
||||||
|
"CogInput",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "CogAbilityWindow_Pools.h"
|
#include "CogAbilityWindow_Pools.h"
|
||||||
#include "CogAbilityWindow_Tags.h"
|
#include "CogAbilityWindow_Tags.h"
|
||||||
#include "CogAbilityWindow_Tweaks.h"
|
#include "CogAbilityWindow_Tweaks.h"
|
||||||
|
#include "CogAIWindow_Blackboard.h"
|
||||||
#include "CogDebugDrawImGui.h"
|
#include "CogDebugDrawImGui.h"
|
||||||
#include "CogDebugPlot.h"
|
#include "CogDebugPlot.h"
|
||||||
#include "CogEngineDataAsset.h"
|
#include "CogEngineDataAsset.h"
|
||||||
@@ -202,6 +203,14 @@ void ACogSampleGameState::InitializeCog()
|
|||||||
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||||
TweaksWindow->SetAsset(AbilityAsset);
|
TweaksWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
|
//---------------------------------------
|
||||||
|
// AI
|
||||||
|
//---------------------------------------
|
||||||
|
//const UCogAIDataAsset* InputAsset = GetFirstAssetByClass<UCogAIDataAsset>();
|
||||||
|
|
||||||
|
UCogAIWindow_Blackboard* BlackboardWindow = CogWindowManager->CreateWindow<UCogAIWindow_Blackboard>("AI.Blackboard");
|
||||||
|
//BlackboardWindow->SetAsset(InputAsset);
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// Input
|
// Input
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user