Hey guys,
Apologies for another new guy without much clue what he’s doing. I’m trying to implement a very simple dialogue system and I’me using a Sentence class which contains a string for a sentence and an int to indicate where the sentence is being spoken from in the scene.
Then I’m using a Dialogue class which is simply a List of ‘Sentence’ class objects.
The Dialogue class is attached to an interactable game object and I’d like to input values for the int and string of each ‘Sentence’ class object in the inspector of the ‘Dialogue’ component. is there any way to do so?
Dialogue class:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Dialogue : MonoBehaviour
{
public List<Sentence> sentences;
// Start is called before the first frame update
}
Sentence class:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Sentence : MonoBehaviour
{
public int dialogueOrigin;
public string sentence;
}
What I’m currently seeing in the ‘Dialogue’ component: