> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/2.0/api/csharp/yarn.unity/yarn.unity.yarncommandattribute/yarn.unity.yarncommandattribute.injector.md).

# Injector

Property in [YarnCommandAttribute](/2.0/api/csharp/yarn.unity/yarn.unity.yarncommandattribute.md)

## Summary

Override the state injector for this command only.

```csharp
public string Injector { get; set; }
```

## Remarks

If not defined, will use the method marked by [YarnStateInjectorAttribute](/2.0/api/csharp/yarn.unity/yarn.unity.yarnstateinjectorattribute.md) on the class, or if that is not defined and the class subclasses `MonoBehaviour`, using `UnityEngine.GameObject.Find(string)`.

If none of those conditions are true, but the function is not static, an error will be thrown. However, if the function is indeed static, this parameter will be ignored.
