# Add External Property to Details Panel

To add an external property from an object that is not being customised to your *Detials Panel* use:

```cpp
IDetailPropertyRow* Row = <IDetailCategoryBuilder variable>.AddExternalObjectProperty({InObject}, PropertyName)
```

For the property name, you can use:

```cpp
GET_MEMBER_NAME_CHECKED(<Class>, <Variable Name>)
```

If the variable is protected or private, use the string property name.

&#x20;

The row that gets generated by the category can have its Display Name edited:

```cpp
Row.DisplayName(FText::FromString(VariableOverrideName));
```

&#x20;

To add it to a group rather than a category, generate the category row first, and then hide that row and use the property handle from the row to generate a new property row in the group.

```cpp
Row->Visibility(EVisibility::Collapsed);
IDetailPropertyRow& NewGroupRow = NewGroup.AddPropertyRow(Row->GetPropertyHandle().ToSharedRef());
```

The Display Name can be set the same as above with the new group-generated row.

&#x20;

Examples:

```cpp
TArray<UBoxComponent*> Killboxes = Settings->GetParentWaterfall()->GetAllKillboxes();
for (UBoxComponent* KillBox : Killboxes)
{
	IDetailGroup& NewGroup = Cat_Kill.AddGroup(KillBox->GetFName(), FText::FromString(FName::NameToDisplayString(KillBox->GetName(), false)));

	auto AddExternalPropertyToKillGroup = [&](FName PropertyName, FString VariableOverrideName = "")
	{
		IDetailPropertyRow* Row = Cat_Kill.AddExternalObjectProperty({ KillBox }, PropertyName);
		if (Row)
		{
			Row->Visibility(EVisibility::Collapsed);
			IDetailPropertyRow& NewGroupRow = NewGroup.AddPropertyRow(Row->GetPropertyHandle().ToSharedRef());

			if (!VariableOverrideName.IsEmpty()) NewGroupRow.DisplayName(FText::FromString(VariableOverrideName));
		}
	};

	AddExternalPropertyToKillGroup(USceneComponent::GetRelativeLocationPropertyName(), "Location");
	AddExternalPropertyToKillGroup(USceneComponent::GetRelativeRotationPropertyName(), "Rotation");
	AddExternalPropertyToKillGroup(USceneComponent::GetRelativeScale3DPropertyName(), "Scale");
	AddExternalPropertyToKillGroup("BoxExtent", "Extent");
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/technical-notes/unreal-engine-notes/details-customisation/add-external-property-to-details-panel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
