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