Ejemplo n.º 1
0
        /**
         * Loads this window async through resources.
         */

        protected IEnumerator BuildWidget(string path, Transform parent, OnBackPressed pressed = null)
        {
            var resourceRequest = Resources.LoadAsync(path);

            yield return(resourceRequest);

            var prefab      = resourceRequest.asset;
            var otherObject = Instantiate(prefab, parent) as GameObject;

            if (otherObject != null)
            {
                var rectTransform = otherObject.GetComponent <RectTransform>();
                var widget        = otherObject.GetComponent <OregoPresenter>();
                rectTransform.localPosition = new Vector3();
                otherObject.transform.SetParent(parent);
                widget.BackPressedPressed = pressed;
            }
        }
Ejemplo n.º 2
0
        private void NotifyBackPressed()
        {
            OnBackPressed?.Invoke();

            SayToLog("Back pressed.");
        }
Ejemplo n.º 3
0
 private void BackButtonPressed()
 {
     OnBackPressed?.Invoke();
 }