Fix conditional compilation in UI layout components.
This commit is contained in:
@@ -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();
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user