Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Injection Rules

Vladislav Kantaev edited this page Apr 20, 2021 · 2 revisions
  • General rules:
    • Value types, and in, out, ref parameters are not supported.
  • Normal C# classes:
    • Injected through public constructors.
  • MonoBehaviour's:
    • Injected through ALL public methods named Construct. For example:
public class Example : MonoBehaviour 
{
    public void Construct(Camera cam) 
    {
        _cam = cam;
    }

    private Camera _cam;
}

Clone this wiki locally