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