im new to unity and im making quiz game, instead using a string and questions i used Object, Prefabs. i have a controller with several buttons. I am instantiate the game object to display and right button is pressed destroys object. but im stuck on removing the current game object. i tried giving each of the game objects with a tag when Button is cliicked but all my game object with the same tag are destroy from my lists.
code ive been rewriting and this is about what i have,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Buttons : MonoBehaviour {
Button 1,2,3,4,5,6;
public float timesleft;
int scoreincrease;
bool isOver;
public void button1_Clicked ()
{
if
(GameObject.tag(“Text”)){
{ GameObject.SetActive(true); //Set object off then to display a new instantiate obj,
scoreincrease ++1;
}
else
{ isOver();
EndGame.
}