public void Update() { try { TopMenu.Update(); } catch (Exception e) { Benchwarp.instance.LogError(e); } }
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>(); TopMenu.BuildMenu(canvas); DontDestroyOnLoad(canvas); }
public void Update() { TopMenu.Update(); }