> For the complete documentation index, see [llms.txt](https://santutu.gitbook.io/mono-dependency-injection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://santutu.gitbook.io/mono-dependency-injection/mechanism/mechanism-for-finding-dependencies.md).

# Mechanism for finding dependencies

This explains the mechanism for finding dependencies of MonoBehaviour fields.

It searches for assignable objects (dependencies) to MonoBehaviour fields within a specified scope.

**What is Scope?**

Scope is the range in the hierarchy view where dependencies are searched.

❗ To zoom  a image in, press Ctrl + scroll the mouse wheel.

<figure><img src="https://2917139309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fto4xkZ2OpP4MpUQlLw9K%2Fuploads%2FibecH5UbaEYMBl7SjpEz%2Fscope.png?alt=media&amp;token=2d0a5a5b-2ea7-44e1-bb0b-274dca2447e4" alt=""><figcaption></figcaption></figure>

**The Ways to Specify Scope:**

1. The default scope can be set in the Injector Window.

![](https://2917139309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fto4xkZ2OpP4MpUQlLw9K%2Fuploads%2FRblsuntqLPJx7j5w8gs7%2Fdefault%20scope.png?alt=media\&token=c5a6038f-2e90-41af-88ed-cf17ad5c244c)

How to access the Injector Window:

(1) Advanced button

<figure><img src="https://2917139309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fto4xkZ2OpP4MpUQlLw9K%2Fuploads%2FIrArMw0RVapxk4L4LDt3%2Fadvanced%20button.png?alt=media&amp;token=320eb847-28c4-4c32-a4e5-445b45d47a2e" alt=""><figcaption></figcaption></figure>

(2) Menu: Window/Santutu/Dependency Injector Window

2\. Methods to set individual scopes for MonoBehaviour fields:

(1) In the Dependency Injection Results Window

<figure><img src="https://2917139309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fto4xkZ2OpP4MpUQlLw9K%2Fuploads%2FozmVbxQbBZ3ijs8iPrhq%2Fset%20scope.png?alt=media&amp;token=b6e0df94-637b-4f5e-8333-4f94c1ac9e98" alt=""><figcaption></figcaption></figure>

❗ When the scope is modified in the editor window, the change is permanently saved and applied with the highest priority. If the modification is removed, it reverts to the default value or atttibute value.

(2) Using attributes in code

<figure><img src="https://2917139309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fto4xkZ2OpP4MpUQlLw9K%2Fuploads%2Fxm3KEqBhs8dVL1yJFtg3%2Fset%20scope2.png?alt=media&amp;token=2e31387e-1bb9-47a6-8a7d-e69a17e70fa2" alt=""><figcaption></figcaption></figure>

&#x20;\
3\. Also please refer to filter page.<br>

{% content-ref url="/pages/JnpVW49e6LhfqH8DlGg8" %}
[Filters](/mono-dependency-injection/advanced/filters.md)
{% endcontent-ref %}
