Hey, so i have a toggle button for if you want to set quest goal complete pops to be active and im using the code like this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ToggleQuestUpdates : MonoBehaviour
{
public Toggle toggle;
void Start()
{
toggle.isOn = QuestComeIn.QuestUpdates;
}
public void Switch()
{
if(toggle.isOn == true)
{
toggle.isOn = false;
QuestComeIn.QuestUpdates = false;
}
else
{
toggle.isOn = true;
QuestComeIn.QuestUpdates = true;
}
}
}
i have the bool in another script as thats where all the other things are related to the quest and they all get saved together.
I have the function called on value changed and when i click it in game it crashes