Fix conditional compilation in UI layout components.
This commit is contained in:
@@ -83,10 +83,12 @@ namespace Cryville.Common.Unity.UI {
|
|||||||
base.OnDidApplyAnimationProperties();
|
base.OnDidApplyAnimationProperties();
|
||||||
SetDirty();
|
SetDirty();
|
||||||
}
|
}
|
||||||
|
#if UNITY_EDITOR
|
||||||
protected override void OnValidate() {
|
protected override void OnValidate() {
|
||||||
base.OnValidate();
|
base.OnValidate();
|
||||||
SetDirty();
|
SetDirty();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
protected override void OnDisable() {
|
protected override void OnDisable() {
|
||||||
SetDirty();
|
SetDirty();
|
||||||
base.OnDisable();
|
base.OnDisable();
|
||||||
|
@@ -6,9 +6,11 @@ namespace Cryville.Common.Unity.UI {
|
|||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
public class SafeArea : UIBehaviour {
|
public class SafeArea : UIBehaviour {
|
||||||
bool _delayedUpdate;
|
bool _delayedUpdate;
|
||||||
|
#if UNITY_EDITOR
|
||||||
protected override void OnValidate() {
|
protected override void OnValidate() {
|
||||||
_delayedUpdate = true;
|
_delayedUpdate = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void Update() {
|
void Update() {
|
||||||
if (_delayedUpdate) {
|
if (_delayedUpdate) {
|
||||||
_delayedUpdate = false;
|
_delayedUpdate = false;
|
||||||
|
@@ -88,10 +88,12 @@ namespace Cryville.Crtr.Browsing.UI {
|
|||||||
base.OnDidApplyAnimationProperties();
|
base.OnDidApplyAnimationProperties();
|
||||||
SetDirty();
|
SetDirty();
|
||||||
}
|
}
|
||||||
|
#if UNITY_EDITOR
|
||||||
protected override void OnValidate() {
|
protected override void OnValidate() {
|
||||||
base.OnValidate();
|
base.OnValidate();
|
||||||
SetDirty();
|
SetDirty();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
protected override void OnDisable() {
|
protected override void OnDisable() {
|
||||||
SetDirty();
|
SetDirty();
|
||||||
base.OnDisable();
|
base.OnDisable();
|
||||||
|
Reference in New Issue
Block a user