diff --git a/Assets/Cryville/Common/Unity/UI/AspectRatioLayoutElement.cs b/Assets/Cryville/Common/Unity/UI/AspectRatioLayoutElement.cs index 2ebb1cd..2910655 100644 --- a/Assets/Cryville/Common/Unity/UI/AspectRatioLayoutElement.cs +++ b/Assets/Cryville/Common/Unity/UI/AspectRatioLayoutElement.cs @@ -83,10 +83,12 @@ namespace Cryville.Common.Unity.UI { base.OnDidApplyAnimationProperties(); SetDirty(); } +#if UNITY_EDITOR protected override void OnValidate() { base.OnValidate(); SetDirty(); } +#endif protected override void OnDisable() { SetDirty(); base.OnDisable(); diff --git a/Assets/Cryville/Common/Unity/UI/SafeArea.cs b/Assets/Cryville/Common/Unity/UI/SafeArea.cs index 608faf3..8f24d66 100644 --- a/Assets/Cryville/Common/Unity/UI/SafeArea.cs +++ b/Assets/Cryville/Common/Unity/UI/SafeArea.cs @@ -6,9 +6,11 @@ namespace Cryville.Common.Unity.UI { [RequireComponent(typeof(RectTransform))] public class SafeArea : UIBehaviour { bool _delayedUpdate; +#if UNITY_EDITOR protected override void OnValidate() { _delayedUpdate = true; } +#endif void Update() { if (_delayedUpdate) { _delayedUpdate = false; diff --git a/Assets/Cryville/Crtr/Browsing/UI/BrowserTabLayout.cs b/Assets/Cryville/Crtr/Browsing/UI/BrowserTabLayout.cs index 68326e0..49eb983 100644 --- a/Assets/Cryville/Crtr/Browsing/UI/BrowserTabLayout.cs +++ b/Assets/Cryville/Crtr/Browsing/UI/BrowserTabLayout.cs @@ -88,10 +88,12 @@ namespace Cryville.Crtr.Browsing.UI { base.OnDidApplyAnimationProperties(); SetDirty(); } +#if UNITY_EDITOR protected override void OnValidate() { base.OnValidate(); SetDirty(); } +#endif protected override void OnDisable() { SetDirty(); base.OnDisable();