Beispiel #1
0
        void Awake()
        {
            LocalizedTextMeshPro textObject = ((LocalizedTextMeshPro)target);

            if (textObject != null)
            {
                selectedKey = textObject.localizedKey;
            }
        }
Beispiel #2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            selectedKey = LocalizedKeySelector.SelectKeyGUI(selectedKey, true, LocalizedObjectType.STRING);

            if (!Application.isPlaying && GUILayout.Button("Use Key", GUILayout.Width(70)))
            {
                LocalizedTextMeshPro textObject = ((LocalizedTextMeshPro)target);
                textObject.localizedKey = selectedKey;
            }
        }