void Start() { dialogueManager = GameObject.Find("Scripts").GetComponent <DialogueManager>(); changer = GameObject.Find("Scripts").GetComponent <CharacterChanger>(); button = GetComponent <Button>(); nextBoxIndexs = Array.ConvertAll(dialogueManager.GiveNextTextbox().Split('-'), s => int.Parse(s)); //find all possible indexes of next textboxes }
void Awake() { instance = this; }