Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit bc0f266

Browse files
LocalizationText获取Text
1 parent 7f592e9 commit bc0f266

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎GameFramework/Runtime/Localization/LocalizationText.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ public string Text
3636

3737
private void Start()
3838
{
39-
_uiText = GetComponent<Text>();
4039
SetUIText(_text);
4140
}
4241

4342
private void SetUIText(string key)
4443
{
44+
if(_uiText = null)
45+
{
46+
_uiText = GetComponent<Text>();
47+
}
4548
_uiText.text = GameFrameworkMode.GetModule<LocalizationManager>().Get(key);
4649
}
4750

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /