I have this button that’s on top of a game object that function when getting click, if the button is on top why the game object behind works like its also getting click. OnClickHide() is the function of the button.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Displayer : MonoBehaviour
{
private GameObject itemDisplayer;
void Start()
{
itemDisplayer = GameObject.Find("ItemDisplayer");
}
public void OnClickHide()
{
itemDisplayer.SetActive(false);
}
}