Re-enabling Panel Still Doesn't Appear
Posted: Sun Nov 24, 2019 10:46 pm
Hey,
So I made a simple script that disables the dialogue panel when clicked, and re-enables when clicked:
the True part goes through when it is clicked the second time and the Dialogue Panel is reactivated but it doesn't appear in scene, why is that?
So I made a simple script that disables the dialogue panel when clicked, and re-enables when clicked:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Fullscreen : MonoBehaviour
{
public GameObject panel;
public bool wasClicked = false;
public void fScreen()
{
if (wasClicked == false)
{
panel.SetActive(false);
wasClicked = true;
}
else if (wasClicked == true)
{
Debug.Log("true");
panel.SetActive(true);
wasClicked = false;
}
}
}