From 77951220872dbb86f78d6907c2c494d75ed14b45 Mon Sep 17 00:00:00 2001 From: Alicja Date: Mon, 26 Sep 2022 23:54:34 +0200 Subject: [PATCH] Translated Main Menu & Settings Menus --- Assets/Scenes/Main Menu.unity | 72 +++++++++++++++- Assets/Scenes/MainMenu - Controls.unity | 36 +++++++- Assets/Scenes/MainMenu - Language.unity | 104 +++++++++++++++++++++--- Assets/Scenes/MainMenu - Settings.unity | 92 +++++++++++++++++++-- Assets/Scenes/MainMenu - Sounds.unity | 74 +++++++++++++++-- Assets/TranslateMeshText.cs | 58 +++++++++++++ Assets/TranslateMeshText.cs.meta | 11 +++ UserSettings/EditorUserSettings.asset | 36 ++++---- 8 files changed, 434 insertions(+), 49 deletions(-) create mode 100644 Assets/TranslateMeshText.cs create mode 100644 Assets/TranslateMeshText.cs.meta diff --git a/Assets/Scenes/Main Menu.unity b/Assets/Scenes/Main Menu.unity index 2e7c3b09..13f66b78 100644 --- a/Assets/Scenes/Main Menu.unity +++ b/Assets/Scenes/Main Menu.unity @@ -134,6 +134,7 @@ GameObject: - component: {fileID: 46569006} - component: {fileID: 46569008} - component: {fileID: 46569007} + - component: {fileID: 46569009} m_Layer: 5 m_Name: ContinueText m_TagString: Untagged @@ -180,7 +181,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Continue + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 0264833e418f9c347a60eea0d843662f, type: 2} m_sharedMaterial: {fileID: -4776278116225565339, guid: 0264833e418f9c347a60eea0d843662f, type: 2} @@ -257,6 +258,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 46569005} m_CullTransparentMesh: 1 +--- !u!114 &46569009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 46569005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Continue + textPolish: Kontynuuj + displayText: {fileID: 46569007} --- !u!1 &115406065 GameObject: m_ObjectHideFlags: 0 @@ -268,6 +284,7 @@ GameObject: - component: {fileID: 115406066} - component: {fileID: 115406068} - component: {fileID: 115406067} + - component: {fileID: 115406069} m_Layer: 5 m_Name: QuitGameText m_TagString: Untagged @@ -314,7 +331,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Quit Game + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 0264833e418f9c347a60eea0d843662f, type: 2} m_sharedMaterial: {fileID: -4776278116225565339, guid: 0264833e418f9c347a60eea0d843662f, type: 2} @@ -391,6 +408,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 115406065} m_CullTransparentMesh: 1 +--- !u!114 &115406069 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 115406065} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Quit Game + textPolish: Wyjdz z gry + displayText: {fileID: 115406067} --- !u!1 &193991225 GameObject: m_ObjectHideFlags: 0 @@ -3295,6 +3327,7 @@ GameObject: - component: {fileID: 1401167277} - component: {fileID: 1401167279} - component: {fileID: 1401167278} + - component: {fileID: 1401167280} m_Layer: 5 m_Name: NewGameText m_TagString: Untagged @@ -3341,7 +3374,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: New Game + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 0264833e418f9c347a60eea0d843662f, type: 2} m_sharedMaterial: {fileID: -4776278116225565339, guid: 0264833e418f9c347a60eea0d843662f, type: 2} @@ -3418,6 +3451,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1401167276} m_CullTransparentMesh: 1 +--- !u!114 &1401167280 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401167276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: New Game + textPolish: Nowa Gra + displayText: {fileID: 1401167278} --- !u!1 &1617351645 GameObject: m_ObjectHideFlags: 0 @@ -3761,6 +3809,7 @@ GameObject: - component: {fileID: 2141716778} - component: {fileID: 2141716780} - component: {fileID: 2141716779} + - component: {fileID: 2141716781} m_Layer: 5 m_Name: SettingsText m_TagString: Untagged @@ -3807,7 +3856,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Settings + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 0264833e418f9c347a60eea0d843662f, type: 2} m_sharedMaterial: {fileID: -4776278116225565339, guid: 0264833e418f9c347a60eea0d843662f, type: 2} @@ -3884,3 +3933,18 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2141716777} m_CullTransparentMesh: 1 +--- !u!114 &2141716781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2141716777} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Settings + textPolish: Ustawienia + displayText: {fileID: 2141716779} diff --git a/Assets/Scenes/MainMenu - Controls.unity b/Assets/Scenes/MainMenu - Controls.unity index 38b23b19..68ace7ea 100644 --- a/Assets/Scenes/MainMenu - Controls.unity +++ b/Assets/Scenes/MainMenu - Controls.unity @@ -321,6 +321,7 @@ GameObject: - component: {fileID: 294519271} - component: {fileID: 294519273} - component: {fileID: 294519272} + - component: {fileID: 294519274} m_Layer: 5 m_Name: BackToSettingsText m_TagString: Untagged @@ -367,7 +368,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: <- Settings + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -444,6 +445,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 294519270} m_CullTransparentMesh: 1 +--- !u!114 &294519274 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 294519270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: <- Settings + textPolish: <- Ustawienia + displayText: {fileID: 294519272} --- !u!1 &379801820 GameObject: m_ObjectHideFlags: 0 @@ -779,6 +795,7 @@ GameObject: - component: {fileID: 724337345} - component: {fileID: 724337347} - component: {fileID: 724337346} + - component: {fileID: 724337348} m_Layer: 5 m_Name: ControlsTitle m_TagString: Untagged @@ -825,7 +842,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Controls + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -902,6 +919,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 724337344} m_CullTransparentMesh: 1 +--- !u!114 &724337348 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 724337344} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Controls + textPolish: Sterowanie + displayText: {fileID: 724337346} --- !u!1 &804061586 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/MainMenu - Language.unity b/Assets/Scenes/MainMenu - Language.unity index 87cc0650..9061ea50 100644 --- a/Assets/Scenes/MainMenu - Language.unity +++ b/Assets/Scenes/MainMenu - Language.unity @@ -134,8 +134,9 @@ GameObject: - component: {fileID: 72160875} - component: {fileID: 72160877} - component: {fileID: 72160876} + - component: {fileID: 72160878} m_Layer: 5 - m_Name: SettingsText + m_Name: tbd m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -180,7 +181,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: to be decided... + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -257,6 +258,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 72160874} m_CullTransparentMesh: 1 +--- !u!114 &72160878 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 72160874} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: To be decided... + textPolish: Do ustalenia... + displayText: {fileID: 72160876} --- !u!1 &205249694 GameObject: m_ObjectHideFlags: 0 @@ -268,6 +284,7 @@ GameObject: - component: {fileID: 205249695} - component: {fileID: 205249697} - component: {fileID: 205249696} + - component: {fileID: 205249698} m_Layer: 5 m_Name: LanguageTitle m_TagString: Untagged @@ -314,9 +331,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Language - -' + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -393,6 +408,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 205249694} m_CullTransparentMesh: 1 +--- !u!114 &205249698 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205249694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Language + textPolish: Jezyk + displayText: {fileID: 205249696} --- !u!1 &241073234 GameObject: m_ObjectHideFlags: 0 @@ -404,8 +434,9 @@ GameObject: - component: {fileID: 241073235} - component: {fileID: 241073237} - component: {fileID: 241073236} + - component: {fileID: 241073238} m_Layer: 5 - m_Name: ContinueText + m_Name: PolishButton-Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -450,7 +481,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Polish + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -527,6 +558,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 241073234} m_CullTransparentMesh: 1 +--- !u!114 &241073238 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241073234} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Polish + textPolish: Polski + displayText: {fileID: 241073236} --- !u!1 &267966503 GameObject: m_ObjectHideFlags: 0 @@ -730,7 +776,7 @@ GameObject: - component: {fileID: 684477376} - component: {fileID: 684477375} m_Layer: 5 - m_Name: ContinueButton + m_Name: PolishButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -946,7 +992,7 @@ GameObject: - component: {fileID: 805192519} - component: {fileID: 805192518} m_Layer: 5 - m_Name: NewGameButton + m_Name: EnglishButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -3171,8 +3217,9 @@ GameObject: - component: {fileID: 1367664214} - component: {fileID: 1367664216} - component: {fileID: 1367664215} + - component: {fileID: 1367664217} m_Layer: 5 - m_Name: NewGameText + m_Name: EnglishButton-Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -3217,7 +3264,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: English + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -3294,6 +3341,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1367664213} m_CullTransparentMesh: 1 +--- !u!114 &1367664217 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1367664213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: English + textPolish: Angielski + displayText: {fileID: 1367664215} --- !u!1 &1580419669 GameObject: m_ObjectHideFlags: 0 @@ -3568,7 +3630,7 @@ GameObject: - component: {fileID: 2130296421} - component: {fileID: 2130296420} m_Layer: 5 - m_Name: SettingsButton + m_Name: tbd m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -3687,6 +3749,7 @@ GameObject: - component: {fileID: 2139353150} - component: {fileID: 2139353152} - component: {fileID: 2139353151} + - component: {fileID: 2139353153} m_Layer: 5 m_Name: BackToSettingsText m_TagString: Untagged @@ -3733,7 +3796,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: <- Settings + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -3810,3 +3873,18 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2139353149} m_CullTransparentMesh: 1 +--- !u!114 &2139353153 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2139353149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: <- Settings + textPolish: <- Ustawienia + displayText: {fileID: 2139353151} diff --git a/Assets/Scenes/MainMenu - Settings.unity b/Assets/Scenes/MainMenu - Settings.unity index ab5050c7..6884a104 100644 --- a/Assets/Scenes/MainMenu - Settings.unity +++ b/Assets/Scenes/MainMenu - Settings.unity @@ -2416,6 +2416,7 @@ GameObject: - component: {fileID: 697818563} - component: {fileID: 697818565} - component: {fileID: 697818564} + - component: {fileID: 697818566} m_Layer: 5 m_Name: LanguageButton m_TagString: Untagged @@ -2462,7 +2463,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Language + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -2539,6 +2540,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 697818562} m_CullTransparentMesh: 1 +--- !u!114 &697818566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 697818562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Language + textPolish: Jezyk + displayText: {fileID: 697818564} --- !u!1 &751802763 GameObject: m_ObjectHideFlags: 0 @@ -2550,6 +2566,7 @@ GameObject: - component: {fileID: 751802764} - component: {fileID: 751802766} - component: {fileID: 751802765} + - component: {fileID: 751802767} m_Layer: 5 m_Name: SoundsText m_TagString: Untagged @@ -2596,7 +2613,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Sounds + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -2673,6 +2690,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 751802763} m_CullTransparentMesh: 1 +--- !u!114 &751802767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 751802763} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Sounds + textPolish: Dzwieki + displayText: {fileID: 751802765} --- !u!1 &861136323 GameObject: m_ObjectHideFlags: 0 @@ -2862,6 +2894,7 @@ GameObject: - component: {fileID: 1318863994} - component: {fileID: 1318863996} - component: {fileID: 1318863995} + - component: {fileID: 1318863997} m_Layer: 5 m_Name: SettingsTitle m_TagString: Untagged @@ -2908,9 +2941,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Settings - -' + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -2987,6 +3018,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1318863993} m_CullTransparentMesh: 1 +--- !u!114 &1318863997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1318863993} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Settings + textPolish: Ustawienia + displayText: {fileID: 1318863995} --- !u!1 &1325179126 GameObject: m_ObjectHideFlags: 0 @@ -2998,6 +3044,7 @@ GameObject: - component: {fileID: 1325179127} - component: {fileID: 1325179129} - component: {fileID: 1325179128} + - component: {fileID: 1325179130} m_Layer: 5 m_Name: ControlsText m_TagString: Untagged @@ -3044,7 +3091,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Controls + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -3121,6 +3168,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1325179126} m_CullTransparentMesh: 1 +--- !u!114 &1325179130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325179126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Controls + textPolish: Sterowanie + displayText: {fileID: 1325179128} --- !u!1 &1430864860 GameObject: m_ObjectHideFlags: 0 @@ -3695,6 +3757,7 @@ GameObject: - component: {fileID: 2135287573} - component: {fileID: 2135287575} - component: {fileID: 2135287574} + - component: {fileID: 2135287576} m_Layer: 5 m_Name: MainMenuText m_TagString: Untagged @@ -3741,7 +3804,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: <- Main Menu + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -3818,3 +3881,18 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2135287572} m_CullTransparentMesh: 1 +--- !u!114 &2135287576 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2135287572} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: <- Main Menu + textPolish: <- Menu Glowne + displayText: {fileID: 2135287574} diff --git a/Assets/Scenes/MainMenu - Sounds.unity b/Assets/Scenes/MainMenu - Sounds.unity index 01e2b4a9..f9be4745 100644 --- a/Assets/Scenes/MainMenu - Sounds.unity +++ b/Assets/Scenes/MainMenu - Sounds.unity @@ -252,8 +252,9 @@ GameObject: - component: {fileID: 479721424} - component: {fileID: 479721426} - component: {fileID: 479721425} + - component: {fileID: 479721427} m_Layer: 5 - m_Name: NewGameText + m_Name: SoundText m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -298,7 +299,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Sound Volume + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -375,6 +376,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 479721423} m_CullTransparentMesh: 1 +--- !u!114 &479721427 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 479721423} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Sound Volume + textPolish: Dzwieki + displayText: {fileID: 479721425} --- !u!1 &537187653 GameObject: m_ObjectHideFlags: 0 @@ -2332,6 +2348,7 @@ GameObject: - component: {fileID: 545480346} - component: {fileID: 545480348} - component: {fileID: 545480347} + - component: {fileID: 545480349} m_Layer: 5 m_Name: SoundsTitle m_TagString: Untagged @@ -2378,7 +2395,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Sound + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -2455,6 +2472,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 545480345} m_CullTransparentMesh: 1 +--- !u!114 &545480349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 545480345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Sounds + textPolish: Dzwieki + displayText: {fileID: 545480347} --- !u!1 &592856118 GameObject: m_ObjectHideFlags: 0 @@ -2859,6 +2891,7 @@ GameObject: - component: {fileID: 1290807624} - component: {fileID: 1290807626} - component: {fileID: 1290807625} + - component: {fileID: 1290807627} m_Layer: 5 m_Name: MusicVolume m_TagString: Untagged @@ -2905,7 +2938,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Music Volume + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -2982,6 +3015,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1290807623} m_CullTransparentMesh: 1 +--- !u!114 &1290807627 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1290807623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: Music Volume + textPolish: Muzyka + displayText: {fileID: 1290807625} --- !u!1 &1328617541 GameObject: m_ObjectHideFlags: 0 @@ -3633,6 +3681,7 @@ GameObject: - component: {fileID: 1575654776} - component: {fileID: 1575654778} - component: {fileID: 1575654777} + - component: {fileID: 1575654779} m_Layer: 5 m_Name: BackToSettingsText m_TagString: Untagged @@ -3679,7 +3728,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: <- Settings + m_text: m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -3756,6 +3805,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1575654775} m_CullTransparentMesh: 1 +--- !u!114 &1575654779 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575654775} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 736f3d6f219f69646bb15f3a3f1333a2, type: 3} + m_Name: + m_EditorClassIdentifier: + textEnglish: <- Settings + textPolish: <- Ustawienia + displayText: {fileID: 1575654777} --- !u!1 &1624489111 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/TranslateMeshText.cs b/Assets/TranslateMeshText.cs new file mode 100644 index 00000000..a8cc1cc5 --- /dev/null +++ b/Assets/TranslateMeshText.cs @@ -0,0 +1,58 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; +using TMPro; + +public class TranslateMeshText : MonoBehaviour +{ +public string textEnglish; + public string textPolish; + public TMP_Text displayText; + private string language; + // Start is called before the first frame update + void Start() + { + language = PlayerPrefs.GetString("language"); + + if (PlayerPrefs.HasKey("language")) + { + language = PlayerPrefs.GetString("language"); + if (language == "English") + { + displayText.text = textEnglish; + } + else if (language == "Polish") + { + displayText.text = textPolish; + } + } + else + { + displayText.text = textEnglish; + } + } + + // Update is called once per frame + void Update() + { + language = PlayerPrefs.GetString("language"); + + if (PlayerPrefs.HasKey("language")) + { + language = PlayerPrefs.GetString("language"); + if (language == "English") + { + displayText.text = textEnglish; + } + else if (language == "Polish") + { + displayText.text = textPolish; + } + } + else + { + displayText.text = textEnglish; + } + } +} diff --git a/Assets/TranslateMeshText.cs.meta b/Assets/TranslateMeshText.cs.meta new file mode 100644 index 00000000..79a9c724 --- /dev/null +++ b/Assets/TranslateMeshText.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 736f3d6f219f69646bb15f3a3f1333a2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 0bf2212c..59115c43 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,31 +9,31 @@ EditorUserSettings: value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a1532f0e1372ce7f518c8ea3f7129370bfb25 flags: 0 RecentlyUsedScenePath-1: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d1a1827f6e93a3ff1a923e7ee2e26 + value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d flags: 0 RecentlyUsedScenePath-2: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d1a1226ece42776f7e93ffdfe - flags: 0 - RecentlyUsedScenePath-3: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a123df6f23b34f1a923e7ee2e26 - flags: 0 - RecentlyUsedScenePath-4: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a123df6f23b34f1a923e7ee2e26 - flags: 0 - RecentlyUsedScenePath-5: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d051c3de5f5353fe7a923e7ee2e26 - flags: 0 - RecentlyUsedScenePath-6: - value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a1532f0e1372ce7f518e8ea3f7129370bfb25 - flags: 0 - RecentlyUsedScenePath-7: value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021 flags: 0 - RecentlyUsedScenePath-8: + RecentlyUsedScenePath-3: value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb flags: 0 + RecentlyUsedScenePath-4: + value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a1532f0e1372ce7f518e8ea3f7129370bfb25 + flags: 0 + RecentlyUsedScenePath-5: + value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb + flags: 0 + RecentlyUsedScenePath-6: + value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a123df6f23b34f1a923e7ee2e26 + flags: 0 + RecentlyUsedScenePath-7: + value: 22424703114646680e0b0227036c72111f19352f223d667d6d051c3de5f5353fe7a923e7ee2e26 + flags: 0 + RecentlyUsedScenePath-8: + value: 22424703114646680e0b0227036c72111f19352f223d667d6d1a1827f6e93a3ff1a923e7ee2e26 + flags: 0 RecentlyUsedScenePath-9: - value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d + value: 22424703114646680e0b0227036c72111f19352f223d667d6d1a1226ece42776f7e93ffdfe flags: 0 vcSharedLogLevel: value: 0d5e400f0650