// Initializes the sample UI.
        private void Start()
        {
            Debug.Assert(To != null, "Please specify \"To\"!");
            Debug.Assert(Cc != null, "Please specify \"Cc\"!");
            Debug.Assert(Bcc != null, "Please specify \"Bcc\"!");
            Debug.Assert(Subject != null, "Please specify \"Subject\"!");
            Debug.Assert(Body != null, "Please specify \"Body\"!");
            Debug.Assert(SendButton != null, "Please specify \"SendButton\"!");
            Load();

            emailSender.text = "Sender address: " + EmailAddress;

            var moreButton = MoreButton.FindInstance();

            if (moreButton != null)
            {
                moreButton.MenuItems = new MoreButton.PopupMenuItem[] { new MoreButton.PopupMenuItem("EXIT", () => Application.Quit()) };
            }

            SendButton.onClick.AddListener(Send);

            if (!IsSmtpConfigured())
            {
                SendButton.GetComponentInChildren <Text>().text = CantSendText;
            }
        }
Example #2
0
        // Initializes the sample UI.
        private void Start()
        {
            Debug.Assert(To != null, "Please specify \"To\"!");
            Debug.Assert(Cc != null, "Please specify \"Cc\"!");
            Debug.Assert(Bcc != null, "Please specify \"Bcc\"!");
            Debug.Assert(Subject != null, "Please specify \"Subject\"!");
            Debug.Assert(Body != null, "Please specify \"Body\"!");
            Load();

            emailSender.text = "Sender address: " + EmailAddress;

            var moreButton = MoreButton.FindInstance();

            if (moreButton != null)
            {
                moreButton.MenuItems = new MoreButton.PopupMenuItem[] { new MoreButton.PopupMenuItem("EXIT", () => Application.Quit()) };
            }
        }