Hello there, i’m really new to C++. Recently I tried to make a new structure with c++ to show the Content directory as a dropdown menu. I have successfully made a new structure, but for some reason it’s nested. What should I fix in the code to make my structure looks ‘normal’?
USTRUCT(BlueprintType)
struct FDPath
{
GENERATED_BODY()
/**
* The path to the directory.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=ContentPath, meta=(ContentDir))
FDirectoryPath DirectoryContentPath;
};
#pragma once
class FGameCoreGameModule : public IModuleInterface {
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
virtual bool IsGameModule() const override {
return true;
}
};
Or perhaps it was the target.cs file that must be modified here, I don’t remember. Since Your image shows you are working with an editor utility widget you could either go for game or editor as well:
using UnrealBuildTool;
using System.Collections.Generic;
public class GameCoreEditorTarget : TargetRules
{
public GameCoreEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.Add("GameCoreEditor");
}
}
But really, what is so bad about having your category show as an open/close arrow??