I am making a quest system in which each quest can have multiple goals of different types. I want to Show/Hide different variables for specific types of goals
public enum GoalType { KillGoal, GatheringGoal, ItemRetreivalGoal, EscortGoal }
[System.Serializable]
public class Goals
{
public string Name;
public string Description;
public GoalType Type;
public bool Completed;
public bool Timed;
public int EnemiesToKill = 1;
public string ItemToRetrieve;
public string NpcToEscort;
public float distanceToEscort;
public string ItemsToGather;
public int amountToGather;
}
here is the quest script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "QuestData", menuName = "Quests")]
public class QuestData : ScriptableObject
{
public List<Quest> Quest = new List<Quest>();
}
public enum QuestType {MainQuest, SideQuest, WeeklyQuest}
[System.Serializable]
public class Quest
{
public string Name;
public QuestType Type;
public bool Completed;
[SerializeReference]
public List<Goals> Goals = new List<Goals>();
}
like shown in the picture
