public void Awake() { // Get reference to Text component _text = GetComponent <Text>(); if (_text == null) { Debug.LogError(string.Format("({0}) Unable to find Text component on this object", this.name)); } // Get reference to Dialogue System _dialogueSystem = FindObjectOfType <DialogueSystem>(); if (_dialogueSystem == null) { Debug.LogError(string.Format("({0}) Unable to find Dialogue System within scene", this.name)); } }
public void Awake() { // Get reference to Text component _text = GetComponent<Text>(); if (_text == null) { Debug.LogError(string.Format("({0}) Unable to find Text component on this object", this.name)); } // Get reference to Dialogue System _dialogueSystem = FindObjectOfType<DialogueSystem>(); if (_dialogueSystem == null) { Debug.LogError(string.Format("({0}) Unable to find Dialogue System within scene", this.name)); } }