123456789101112131415161718192021222324252627282930 |
- using UnityEngine;
- using System.Collections;
- public class DebugLanguageSwitcher : MonoBehaviour
- {
- void Start()
- {
- DebugViewManager.OnDebugView += OnDebugView;
- }
- void OnDestroy()
- {
- DebugViewManager.OnDebugView -= OnDebugView;
- }
- void OnDebugView()
- {
- GUILayout.BeginHorizontal();
- if (GUILayout.Button("English"))
- {
- Localization.instance.currentLanguage = "English";
- }
- if (GUILayout.Button("Icelandic"))
- {
- Localization.instance.currentLanguage = "Icelandic";
- }
- GUILayout.EndHorizontal();
- }
- }
|