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");
            }
         
        }