# Indirect Reference

If you select PowerUp Gameobject in the hierarchy, you can see that it has a HealthPowerUp component attached to it.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXelv3lajocrAkpKUkKlSodLm3Zv1rrT7xGcBWzxqrun55xub4nplMbQ9eP2b86bDZUAbtzg85ZKIVOWbHk6cJgGmSiLAnvGd3x7X5vJg5hbelrULLBXlcZEM-tFMV3IMs5MYfaLYCIx73mvw9ADRrbAzLOc?key=IDL7BEtHVD1t5qGtDI6IRQ" alt="" width="375"><figcaption></figcaption></figure>

This component references the scriptable object wrapper (PlayerStats), as opposed to directly referencing the Health ScriptableVariable. If you check the code for this component, you see how to access the Health indirectly:

```csharp
public class HealthPowerUp : MonoBehaviour
{
    [SerializeField] private PlayerStats _playerStats;

    private void OnTriggerEnter(Collider other)
    {
        _playerStats.Health.Add(30);
    }
}
```

This can be useful. For example, if you need to access multiple sub-assets of the same wrapper in a class. If you press Play and move the player into the power up, it will heal the player.


---

# 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://obvious-game.gitbook.io/soap/scene-documentation/7_scriptablesubassets/indirect-reference.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.
