Question by 
               aymanisadon · Mar 24, 2018 at 10:48 PM · 
                textimagewaitforsecondsdisappearappear  
              
 
              How do I make both an Image and Text appear when a button is clicked?
I have just started using unity and I am beginning to create Android Games. I want an error message to pop up when the user clicks one of the buttons I have in my current game. However, I'm not sure how I can get both an image and text to appear and then wait for 10 seconds then disappear again. This is the code so far:
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour {
     public Image displayImage;
 public void DisplayImage() {
     displayImage.image = "ErrorImage"; 
 }
 
     public Text displayText;
 public void DisplayText() {
     displayText.text = "ErrorText";
 }
 
               }
               Comment
              
 
               
              Your answer