> For the complete documentation index, see [llms.txt](https://docs.oserosuite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oserosuite.com/technical-notes/unreal-engine-notes/details-customisation/add-external-property-to-details-panel.md).

# 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");
}
```
