using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class DialogManager
{
private GameObject name;
public string speakerName;
public GameObject startDialog;
// Use this for initialization
void Awake ()
{
//gets the character's Name
speakerName = transform.parent.name;
//changes the UI name to character's name
name = GameObject.Find("Name");
TextMeshProUGUI text = name.GetComponent<TextMeshProUGUI>();
text.text = speakerName;
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown("enter")
updateDialog("a");
}
}
public void updateDialog(string choice)
{
//GameObject.Find(i+choice);
Debug.Log(i+choice);
}
I declared a method and I was attempting to use it in my update function, but its coming up as âError unexpected symbol âupdateDialogââ why is this âunexpectedâ?
I tried moving the method declaration outside of the scope of the class, I tried removing my counter to see if that helped, I double checked all of the braces. Still confused