Ejemplo n.º 1
0
        private void SetUpBasicUIComponents()
        {
            Canvas = new GameObject();
            Canvas = UICanvas.AddUICreatorCompnent(Canvas, GameManager);

            CreateEventSystem(Canvas.transform);
        }
Ejemplo n.º 2
0
        public static GameObject AddUICreatorCompnent(GameObject objectAddingUICreatorTo, GameManager gameManager)
        {
            objectAddingUICreatorTo.SetActive(false);

            UICanvas uiCreator = objectAddingUICreatorTo.AddComponent <UICanvas>() as UICanvas;

            uiCreator.GameManager = gameManager;
            objectAddingUICreatorTo.SetActive(true);

            return(objectAddingUICreatorTo);
        }