Skip to content

Instantly share code, notes, and snippets.

@turbohermit
Created January 4, 2018 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turbohermit/e60b37080983db3ee9cc00c90207ada9 to your computer and use it in GitHub Desktop.
Save turbohermit/e60b37080983db3ee9cc00c90207ada9 to your computer and use it in GitHub Desktop.
[System.Serializable]
public class DialogueContainer : ScriptableObject
{
//Unique ID used as ref
public string ID;
//All variants of the text to display
public string contentText;
//The response options
public List<DialogueOptionContainer> responseOptions;
//The tags this dialogue uses
public List<string> tags;
}
[CreateAssetMenu(fileName = "Dialogues", menuName = "Dialogue Database", order = 1)]
public class DialogueDatabaseFile : ScriptableObject
{
public List<DialogueContainer> dialogues = new List<DialogueContainer>();
}
[System.Serializable]
public struct DialogueOptionContainer
{
//Text to display as line
public string optionText;
//The reference to what DialogueContainer the dialogue goes when chosen
public DialogueContainer optionRef;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment