# Displaying properties of other components

There may be cases where you want to "embed" another component's properties in your inspector.

{% code fullWidth="false" %}

```csharp
// componentReference here would be any reference to an AirshipBehaviour
var componentProperty = serializedObject.FindAirshipProperty("componentReference");
if (componentProperty.objectReferenceValue is AirshipComponent component) {
    // this is similar to serializedObject, but pointing at a different component
    var componentSerializedObject = new AirshipSerializedObject(component);
    
    // Then you can use componentSerializedObject as you would with serializedObject
    
    // ApplyModifiedProperties *must* be called otherwise the properties will not change.
    componentSerializedObject.ApplyModifiedProperties();
}
```

{% endcode %}

If you want to use the custom inspector (if you have one defined for the component) you can do

{% code fullWidth="false" %}

```csharp
var componentProperty = serializedObject.FindAirshipProperty("componentReference");
if (componentProperty.objectReferenceValue is AirshipComponent component) {
    // garb the custom editor and render it
    var componentEditor = AirshipCustomEditors.GetEditor(component);
    componentEditor.OnInspectorGUI();
    // Apply any modified properties from the above call
    componentEditor.serializedObject.ApplyModifiedProperties();
}

```

{% endcode %}


---

# 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.airship.gg/editor-extensions/custom-inspectors-c/displaying-properties-of-other-components.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.
