Amazon.UnityInitializer.AttachToGameObject C# (CSharp) Метод

AttachToGameObject() публичный статический Метод

Attaches the initializer to a game object
public static AttachToGameObject ( GameObject gameObject ) : void
gameObject UnityEngine.GameObject The game object to which you attach the initializer to
Результат void
        public static void AttachToGameObject(GameObject gameObject)
        {
            if (gameObject != null)
            {
                gameObject.AddComponent<UnityInitializer>();
                UnityEngine.Debug.Log(string.Format(@"Attached unity initializer to {0}", gameObject.name));
            }
            else
            {
                throw new ArgumentNullException("gameObject");
            }
         
        }