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;
}
}
}
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?
When you deactivate the Dialogue Panel's GameObject, it resets its Animator. The Animator's default state is to keep the panel hidden (unless you've changed or removed the animator controller).
The SetDialoguePanel() sequencer command properly handles the Animators of the dialogue panel and sub-panels such as subtitle panels and menu panels.
Normally you'll use sequencer commands in conversations' Sequence field. In this case to call it from an external script, use code line this: