void Awake() { SL_NGUISpriteName textObject = ((SL_NGUISpriteName)target); if (textObject != null) { selectedKey = textObject.localizedKey; } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); selectedKey = LocalizedKeySelector.SelectKeyGUI(selectedKey, true, LocalizedObjectType.STRING); if (!Application.isPlaying && GUILayout.Button("Use Key", GUILayout.Width(70))) { SL_NGUISpriteName spriteObject = ((SL_NGUISpriteName)target); spriteObject.localizedKey = selectedKey; } }