private void Awake()
        {
            form = GetComponentInParent <FeedbackForm>();

            // register event handlers
            form.OnFormOpened.AddListener(startSelectedCoroutine);
            form.OnFormClosed.AddListener(stopCoroutineIfExists);
        }
Example #2
0
        public virtual void Awake()
        {
            // find form in parent(s)
            Form = GetComponentInParent <FeedbackForm>();
            if (!Form)
            {
                Debug.LogError("This field is not part of a Feedback Form!");
            }

            // register events
            Form.OnFormOpened.AddListener(FormOpened);
            Form.OnFormSubmitted.AddListener(FormSubmitted);
            Form.OnFormClosed.AddListener(FormClosed);
        }