Make copyright text auto set year by system date

This commit is contained in:
2026-01-19 18:24:26 -07:00
parent ae41ea5b5b
commit b7f20785d2
2 changed files with 4 additions and 1 deletions

View File

@@ -1121,7 +1121,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: \u00A9 2024 - 2025 Lncvrt. All rights reserved. m_text:
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2} m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2} m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
@@ -1724,6 +1724,7 @@ MonoBehaviour:
updateButton: {fileID: 1292044491} updateButton: {fileID: 1292044491}
profileButton: {fileID: 1895205574} profileButton: {fileID: 1895205574}
profilePrefab: {fileID: 3162524169402907368, guid: ed502784d1f0b48ee8e614eb6d09f2fb, type: 3} profilePrefab: {fileID: 3162524169402907368, guid: ed502784d1f0b48ee8e614eb6d09f2fb, type: 3}
copyrightText: {fileID: 319334213}
--- !u!1 &673338277 --- !u!1 &673338277
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -9,12 +9,14 @@ public class MenuScript : MonoBehaviour
[SerializeField] private Button updateButton; [SerializeField] private Button updateButton;
[SerializeField] private Button profileButton; [SerializeField] private Button profileButton;
[SerializeField] private ProfileMenu profilePrefab; [SerializeField] private ProfileMenu profilePrefab;
[SerializeField] private TMP_Text copyrightText;
void Awake() void Awake()
{ {
LatestVersionText.Instance.text = updateText; LatestVersionText.Instance.text = updateText;
LatestVersionText.Instance.updateButton = updateButton; LatestVersionText.Instance.updateButton = updateButton;
LatestVersionText.Instance.RefreshText(); LatestVersionText.Instance.RefreshText();
copyrightText.text = $"\\u00A9 {System.DateTime.Now.Year} Lncvrt. All rights reserved.";
if (Application.isMobilePlatform || Application.isEditor) if (Application.isMobilePlatform || Application.isEditor)
{ {