예제 #1
0
        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));
            }
        }
예제 #2
0
        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));
            }
        }