public void Update() { PickPanel.Update(); if (Inspector.ToggleInspect()) { if (ItemManager.Instance.currentSelect != null && !Inspector.IsToggle()) { Inspector.Show(); } else { Inspector.Hide(); } } }
public void BuildMenus() { LoadResources(); canvas = new GameObject(); canvas.AddComponent <Canvas>().renderMode = RenderMode.ScreenSpaceOverlay; CanvasScaler scaler = canvas.AddComponent <CanvasScaler>(); scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize; scaler.referenceResolution = new Vector2(1920f, 1080f); canvas.AddComponent <GraphicRaycaster>(); DontDestroyOnLoad(canvas); DescriptionPanel.BuildMenu(canvas); PickPanel.BuildMenu(canvas); HUD.BuildMenu(canvas); ItemManager.Instance.SwitchGroup(0); }