Replace text components in the main browser with TMP.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Cryville.Crtr.Browsing {
|
||||
@@ -10,14 +11,14 @@ namespace Cryville.Crtr.Browsing {
|
||||
|
||||
private bool _dir;
|
||||
private Image _icon;
|
||||
private Text _title;
|
||||
private Text _desc;
|
||||
private TMP_Text _title;
|
||||
private TMP_Text _desc;
|
||||
|
||||
#pragma warning disable IDE0051
|
||||
void Awake() {
|
||||
_icon = transform.Find("__content__/Icon").GetComponent<Image>();
|
||||
_title = transform.Find("__content__/Texts/Title/__text__").GetComponent<Text>();
|
||||
_desc = transform.Find("__content__/Texts/Description/__text__").GetComponent<Text>();
|
||||
_title = transform.Find("__content__/Texts/Title/__text__").GetComponent<TMP_Text>();
|
||||
_desc = transform.Find("__content__/Texts/Description/__text__").GetComponent<TMP_Text>();
|
||||
}
|
||||
void OnDestroy() {
|
||||
if (meta.Icon != null) meta.Icon.Cancel();
|
||||
|
Reference in New Issue
Block a user