Skip to content

Commit 49d8b0e

Browse files
committed
feat: On validate on version text
1 parent 77b3f8a commit 49d8b0e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Assets/JCSUnity/Scripts/UI/Version/JCS_VersionText.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,19 @@ private void Awake()
3535
UpdateVersionNo();
3636
}
3737

38+
#if UNITY_EDITOR
39+
private void OnValidate()
40+
{
41+
UpdateVersionNo();
42+
}
43+
#endif
44+
3845
/// <summary>
3946
/// Update the version number once.
4047
/// </summary>
4148
public void UpdateVersionNo()
4249
{
43-
text = string.Format(mFormat, Application.version);
50+
text = string.Format(mFormat, Application.version);
4451
}
4552
}
4653
}

0 commit comments

Comments
 (0)