Creating an Editor for my application.

I am working on a exploratory project for which I need to replicate a bunch of Unreal’s Editor features. Right now I am stuck on how to replicate the Details Panel to expose the properties of the instantiated meshes in the world.

Details Panel

You can click on any procedural mesh, loaded through Assimp, in the world and the manipulators (translate, rotate, scale) will show up. One menu button (Details) generates the floating window that lists all the properties. This works fine when running the project in the editor window and PIE. Something like …

My Details Panel

I have a C++ class exposed to blueprint that helps me get all the properties from the given AActor with the a recursive function (for structs and arrays)


TArray<FParsedPropertyData> UPropertyBlueprintExposer::ParseProperty(UProperty* Property, void* ValuePtr, FString & parentName)
{
     FString CategoryName = Property->GetMetaData(FName("Category"));

     if (CategoryName.IsEmpty())
         CategoryName = FString("Class Variable");

     FString CPPType = *Property->GetCPPType();

     FString NameCPP = *Property->GetNameCPP();

     ... more code here ...]
}

and then goes and tries casting the property to all UProperty child types to get the Property Value.

The problem is that


Property->GetMetaData(FName("Category"));

is under a #if WITH_EDITOR block, despite being in the runtime namespaces and runtime folders. So I cannot package my project.

I know I won’t get the transform and other “properties” that appear in the editor details panel querying for the UProperties but some of that data is valuable to me.

Is there any other way to get that data that doesn’t rely on Editor exclusive code?

Bump if you find the question interesting, or feel free to comment

You could implement a similar approach directly using reflection:

It is actually against the TOS to package a game using any Editor code. You have to bo be super careful.

Yes, I am aware of that. Thanks :slight_smile: