Hello again. Does anyone know how to hide objects by its tag using button. Please check the script below. All i have done
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BlockViewer : MonoBehaviour {
private GameObject cubeObject;
void Start()
{
cubeObject2 = GameObject.FindGameObjectWithTag("Cube");
}
public void Disable()
{
cubeObject.SetActive(false);
}
public void Enable()
{
cubeObject.SetActive(true);
}
}