Fixed antialiasing setting sometimes not being applied

This commit is contained in:
katboi01
2025-01-31 11:03:07 +01:00
parent 45a17176be
commit 7eb8de69df
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -168,7 +168,6 @@ public class UmaViewerUI : MonoBehaviour
WorkModeDropdown.SetValueWithoutNotify((int)Config.Instance.WorkMode); WorkModeDropdown.SetValueWithoutNotify((int)Config.Instance.WorkMode);
LanguageDropdown.SetValueWithoutNotify((int)Config.Instance.Language); LanguageDropdown.SetValueWithoutNotify((int)Config.Instance.Language);
AntialiasingDropdown.SetValueWithoutNotify(Config.Instance.AntiAliasing); AntialiasingDropdown.SetValueWithoutNotify(Config.Instance.AntiAliasing);
ChangeAntiAliasing(Config.Instance.AntiAliasing);
UpdateDBButton.interactable = (Config.Instance.WorkMode == WorkMode.Standalone); UpdateDBButton.interactable = (Config.Instance.WorkMode == WorkMode.Standalone);
LoadedAssetsClear(); LoadedAssetsClear();
UmaAssetManager.OnLoadedBundleUpdate += LoadedAssetsAdd; UmaAssetManager.OnLoadedBundleUpdate += LoadedAssetsAdd;
@@ -178,6 +177,7 @@ public class UmaViewerUI : MonoBehaviour
#if UNITY_ANDROID && !UNITY_EDITOR #if UNITY_ANDROID && !UNITY_EDITOR
canvasScaler.referenceResolution = new Vector2(1280, 720); canvasScaler.referenceResolution = new Vector2(1280, 720);
#endif #endif
StartCoroutine(ApplyGraphicsSettings());
} }
private void OnDestroy() private void OnDestroy()
@@ -188,7 +188,6 @@ public class UmaViewerUI : MonoBehaviour
private void Update() private void Update()
{ {
if (Builder.CurrentAudioSources.Count > 0 && Builder.CurrentAudioSources[0]) if (Builder.CurrentAudioSources.Count > 0 && Builder.CurrentAudioSources[0])
{ {
AudioSource MianSource = Builder.CurrentAudioSources[0]; AudioSource MianSource = Builder.CurrentAudioSources[0];
@@ -221,6 +220,13 @@ public class UmaViewerUI : MonoBehaviour
} }
} }
/// <summary>Some settings may not be saved when set in Start()</summary>
private IEnumerator ApplyGraphicsSettings()
{
yield return 0;
ChangeAntiAliasing(Config.Instance.AntiAliasing);
}
public void HighlightChildImage(Transform mainObject, UmaUIContainer child) public void HighlightChildImage(Transform mainObject, UmaUIContainer child)
{ {
foreach (var t in mainObject.GetComponentsInChildren<UmaUIContainer>()) foreach (var t in mainObject.GetComponentsInChildren<UmaUIContainer>())
+1 -1
View File
@@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 2.1.23 bundleVersion: 2.1.24
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0