more editor fixes (#574)

This commit is contained in:
Braedon Lewis
2023-10-27 16:19:16 -04:00
committed by GitHub
parent b22de5abdb
commit 4afa1f646c
68 changed files with 1754 additions and 62 deletions

View File

@ -162,6 +162,14 @@ namespace HeavenStudio.Editor
Application.Quit();
}
public void Update()
{
if (!PersistentDataManager.gameSettings.scaleWScreenSize)
MainCanvas.scaleFactor = 1.0f + (0.25f * PersistentDataManager.gameSettings.editorScale);
MainCanvas.GetComponent<CanvasScaler>().uiScaleMode = (PersistentDataManager.gameSettings.scaleWScreenSize) ? CanvasScaler.ScaleMode.ScaleWithScreenSize : CanvasScaler.ScaleMode.ConstantPixelSize;
}
public void LateUpdate()
{
if (lastScreenSize != new Vector2(UnityEngine.Screen.width, UnityEngine.Screen.height))