Hide Image ?

I’m making 2d game. in my canvis there is an image. I want to show/hide.
i did

image1.enable = false;

I make it GO

image1.setactive(false);

but not working

any advise ?

1 Like

enabled

http://docs.unity3d.com/ScriptReference/UI.Image.html

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class Example : MonoBehaviour[/URL]
{
public Image pauseMenu;

public void Start()
{
//Enables the pause menu UI.
pauseMenu.enabled = true;
}
}

trust me. this code not working with me. it’s from Unity 5.1.3 ?

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Example : MonoBehaviour {

    public Image pauseMenu;
   

    public void Start()
    {
      
       
    }

    // Update is called once per frame
    void Update () {
        if (Input.GetKeyDown(KeyCode.A))
        {
            pauseMenu.enabled = true;
        }
    }
  
}