I could add a Dialogue System Trigger to the gameobject, set everything up there, and trigger the OnUse method, but to make it easier for my level designer, I'd like to keep it simple and only show a few options.
Is there a way to reference a database, and get some dropdowns, similar to the Dialogue System Trigger?
I got this far, but then I don't know how to get the strings from the database to show up:
Code: Select all
[SerializeField]
private DialogueDatabase referenceDatabase;
[ValueDropdown(nameof(GetConversations))]
[SerializeField]
private string conversationTitle;
Code: Select all
private IList<ValueDropdownItem<int>> GetConversations()
{
return new ValueDropdownList<int>
{
{ "The first option", 1 },
{ "The second option", 2 },
{ "The third option", 3 },
};
}
When I have that, I guess I can just:
Code: Select all
DialogueManager.StartConversation(conversationTitle);