Snaparazzi/Assets/Scripts/PromptList.cs
Morgan - 6 Freedom c33825d600 users can vote
2024-01-28 13:18:40 +01:00

28 lines
639 B
C#

using System;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "PromptList", menuName = "ScriptableObjects/Prompt List", order = 1)]
public class PromptList : ScriptableObject
{
public List<Prompt> prompts = new();
/// <summary>
/// Create a new entry with a unique ID
/// </summary>
[ContextMenu("Create Entry")]
private void CreateEntry()
{
Prompt temp = new()
{
id = Guid.NewGuid().ToString()
};
prompts.Add(temp);
}
public Prompt GetPromptById(string _id)
{
return prompts.Find(x => x.id == _id);
}
}