How to show UProperties in a DockTab for a plugin

Hey,

I am building a C++ plugin and have a UClass with the properties I want,

  1. how can I use the Slate Widgets to have these show up and be editable in the editor when I press my plugin button (It’s a standalone type that opens a DockTab),

  2. is a customization required ? Unfortunately I have not found a working tutorial on this yet.
    I have an IDetailCustomization inherited class and I understand that it is supposed to just customize the layout of a uclass, but

  3. How do you make that UClass show up in a DockTab ?

I have the following classes for clarity :
FPlanetEngine (Plugin Module)
FPlanetEngineStyle
FPlanetEngineCommands
UPlanetEngineData
FPlanetEngine​​​​​​​Details

  1. I want to make the details come up and be editable in a DockTab like so :
    ​​​​​​​

Thank you,

You can spawn a SSingleObjectDetailsPanel as the content of your tab and then pass it an instance of your class to display with the SetPropertyWindowContents method.

Do you need to include any additional depencies ?
I currently have


    TSharedRef<SDockTab> DockTab = SNew(SDockTab)
        .TabRole(ETabRole::NomadTab)
        .Content()
        
            SNew(SSingleObjectDetailsPanel)
            .SetPropertyWindowContents(PlanetEngineData)

            ];

And the header for including SSingleObjectDetailsPanel.h cannot be found for some reason

Must include “KismetWidgets” to your Build.cs public modules.

Right, I added that, but for some reason it still won’t recognize the header for the detail row.
These are my current depencies :


        PublicDependencyModuleNames.AddRange(
            new string]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "InputCore",
                "ProceduralMeshComponent",
                "KismetWidgets"
                // ... add other public dependencies that you statically link with here ...
            }
            );

and then it says cannot open source file on



#include "SSingleObjectDetailsPanel.h"

you also should have Slate and SlateCore modules there.

It is still saying the same thing, I added slate and slatecore, I have those in the private dependencies as well.
I have no clue as to why it is not working at this point

Is your module Editor type or runtime type?
Runtime modules cannot use these classes from Editor.

It is an Editor type, in my .uplugin file I have


    "FileVersion": 3,
    "Version": 1,
    "VersionName": "1.0",
    "FriendlyName": "PlanetEngine",
    "Description": "",
    "Category": "Other",
    "CreatedBy": "",
    "CreatedByURL": "",
    "DocsURL": "",
    "MarketplaceURL": "",
    "SupportURL": "",
    "CanContainContent": false,
    "IsBetaVersion": false,
    "IsExperimentalVersion": false,
    "Installed": false,
    "Modules": 
        {
            "Name": "PlanetEngine",
            "Type": "Editor",
            "LoadingPhase": "Default"
        }
    ],    
    "Plugins":                       
      {                                
        "Name": "ProceduralMeshComponent",
        "Enabled": true                
      }
    ]
}

Just putting everything down for clarity



        PublicDependencyModuleNames.AddRange(
            new string]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "InputCore",
                "ProceduralMeshComponent",
                "Slate",
                "SlateCore",
                "KismetWidgets"
                // ... add other public dependencies that you statically link with here ...
            }
            );


        PrivateDependencyModuleNames.AddRange(
            new string]
            {
                "Projects",
                "InputCore",
                "UnrealEd",
                "PropertyEditor",
                "LevelEditor",
                "CoreUObject",
                "Engine",
                "Slate",
                "SlateCore"
                // ... add private dependencies that you statically link with here ...    
            }
            );
        

and then in my module startup class I try to do


#include "SSingleObjectDetailsPanel"

and it freaks out.

Hey, @**BrUnO XaVIeR do you have any other ideas of what can be causing this error ?
I tried changing Editor mode to DeveloperTool, as well as adding KismetWidgets to private as well and nothing seems to recognize the header for the property row.

Also, if it does work, do I need to spawn it inside the brackets of the dock tab content like so :**


  
     TSharedRef<SDockTab> DockTab = SNew(SDockTab) 
.TabRole(ETabRole::NomadTab)        
.Content( SNew(SSingleObjectDetailsPanel)
.SetPropertyWindowContents(PlanetEngineData));


or inside square brackets like so :




   TSharedRef<SDockTab> DockTab = SNew(SDockTab)
         .TabRole(ETabRole::NomadTab)        
.Content()        
            
SNew(SSingleObjectDetailsPanel)            
.SetPropertyWindowContents(PlanetEngineData)            
 ];


The API page shows how you’re supposed to include the header file :

https://docs.unrealengine.com/en-US/…nel/index.html

Also you can search engine source for usage examples.

I did some digging, for anyone having this problem in the future, add “Kismet” to your private dependency modules.
The only thing left is to figure out how to set the actual contents inside of it.