} // HandleMessageBox() // Handles what to do when our UI scale or size changes public void ChangedUISizeScale() { // Force the updates so our calculations of sizes use the // current canvasScaler settings... // Note that Canvas.ForceUpdateCanvases() does not scale the // canvas, which apparently only happens at Update() on the // Canvas Scaler canvasScaler.SendMessage("Update"); if (!mbIsClosed) { // Resize an open message box upon rescale OpenMessageBox(); } // And scroll contents to the bottom. if (messageLog != null) { messageLog.ScrollToBottom(); } // Resize the DialogBox to be same portion of screen. SetDialogBoxSize(); dialogBoxTextSize = GetDialogTextSize(); // Fire an event if the dialog box is open and // the player resizes things, so it can re-render. if (dialogBox.active) { dialogSizeChangeListeners.Invoke(); } } // ChangedUISizeScale