public static T GetComponentInDirectChildren <T>(this GameObject gameObject) { if (gameObject is null) { throw new NullReferenceException(nameof(gameObject)); } if (!gameObject) { throw new MissingReferenceException(nameof(gameObject)); } return(GameObjectUtilities.GetComponentDirectWithoutChecks <T>(gameObject)); }