public static void InjectGameObject(this IObjectResolver resolver, GameObject gameObject)
        {
            var buffer = UnityEngineObjectListBuffer <MonoBehaviour> .Get();

            void InjectGameObjectRecursive(GameObject current)
            {
                if (current == null)
                {
                    return;
                }

                buffer.Clear();
                current.GetComponents(buffer);
                foreach (var monoBehaviour in buffer)
                {
                    resolver.Inject(monoBehaviour);
                }

                var transform = current.transform;

                for (var i = 0; i < transform.childCount; i++)
                {
                    var child = transform.GetChild(i);
                    InjectGameObjectRecursive(child.gameObject);
                }
            }

            InjectGameObjectRecursive(gameObject);
        }
 static void InjectUnityEngineObject <T>(IObjectResolver resolver, T instance) where T : UnityEngine.Object
 {
     if (instance is GameObject gameObject)
     {
         resolver.InjectGameObject(gameObject);
     }
     else
     {
         resolver.Inject(instance);
     }
 }