> For the complete documentation index, see [llms.txt](https://docs.msquared.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.msquared.io/creation/unreal-development/features-and-tutorials/helpers-and-extras/objects-with-world-context.md).

# Objects with "world context"

{% hint style="success" %}
verified: 2025-11-19 version: v39
{% endhint %}

If you create a class off of a base UObject, it isn't guaranteed to have a "world context". For this reason, Unreal will hide away any methods that require a "world context object". This includes a lot of common, useful helpers, like `GetAllActorsOfClass`.

<figure><img src="/files/dpgPbXNbSA6kClRljk0M" alt=""><figcaption></figcaption></figure>

To help with this, we have added a `M2_ObjectWithWorldContext` helper - classes extending this will display the methods that require a world context object. If you create these objects with a suitable outer, that has the world context, then these methods will work.

<figure><img src="/files/ifVimMLXbiWg2bG660AM" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.msquared.io/creation/unreal-development/features-and-tutorials/helpers-and-extras/objects-with-world-context.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.
