/// <summary>
 /// Awake is called when the script instance is being loaded.
 /// </summary>
 void Awake()
 {
     if (session == null)
     {
         session = GetComponentInParent <Session>();
     }
     if (canvas == null)
     {
         canvas = GetComponent <Canvas>();
     }
     if (popupController == null)
     {
         popupController = GetComponentInChildren <PopupController>(true);
     }
     // read word list
     if (uuidWordList)
     {
         words = uuidWordList.text.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
     }
     GenerateSidebar();
 }
        /// <summary>
        /// Called when the script is loaded or a value is changed in the
        /// inspector (Called in the editor only).
        /// </summary>
        void OnValidate()
        {
            if (session == null)
            {
                session = GetComponentInParent <Session>();
            }
            if (canvas == null)
            {
                canvas = GetComponent <Canvas>();
            }
            if (popupController == null)
            {
                popupController = GetComponentInChildren <PopupController>(true);
            }
#if UNITY_EDITOR
            UnityEditor.EditorApplication.delayCall += LateValidate;
            foreach (var dh in ActiveLocalFileDataHandlers)
            {
                dh.onValidateEvent.AddListener(() => UnityEditor.EditorApplication.delayCall += UpdateLocalFileElementState);
            }
#endif
        }