> For the complete documentation index, see [llms.txt](https://fast-studios.gitbook.io/press-e/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fast-studios.gitbook.io/press-e/manual/scripting/interaction-manager/interactionmanager.getplayerobject.md).

# InteractionManager.GetPlayerObject

Called automatically on **Awake** and when changing scenes so the manager can resolve the **player GameObject** according to your configured detection method (see the Interaction Manager page).

* If you provide `objectThatInteracted`, it will be used as a shortcut to assign the player when appropriate.
* The method **returns** the resolved player `GameObject`.

```csharp
void GetPlayerToDebug()
{
    // Depending on the detection method, tries to resolve the player object
    GameObejct newPlayerObject = InteractionManager.singleton.GetPlayerObject();
}

void OnTriggerEnter(Collider other)
{
    // Supose the 'other' is the player entering this trigger
    InteractionManager.singleton.GetPlayerObject(other.gameObject);
}
```
