void Start() { GameObject configGameObject; configGameObject = GameObject.FindGameObjectWithTag("ConfigureSocialMediaPack"); if (configGameObject == null) { Debug.LogWarning("You need the GameObject \"ConfigureSocialMediaPack\" in your scene for Tweets to work."); } else { config = configGameObject.GetComponent <ConfigureSocialMediaPack>(); } Button btn = gameObject.GetComponent <Button>(); btn.onClick.AddListener(TaskOnClick); }
void Awake() { if (Instance) { DestroyImmediate(gameObject); } else { DontDestroyOnLoad(gameObject); Instance = this; } if (TwitterProfile == null || TwitterProfile == "") { if (!TwitterMessage.Contains('@')) { Debug.LogWarning("The variable TwitterProfile is empty. \nHow will your fans find you on Twitter? (ʘAʘ’)"); } } }