Skip to content

Commit a10f9d5

Browse files
committed
Fix TrashItems: Text component is now TMP_Text.
1 parent 8696659 commit a10f9d5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

TrashItems/TrashItems.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using BepInEx.Logging;
1212

1313
using Random = UnityEngine.Random;
14+
using TMPro;
1415

1516
namespace TrashItems
1617
{
@@ -227,7 +228,7 @@ public void SetText(string text)
227228
LogErr("ac_text not found!");
228229
return;
229230
}
230-
tText.GetComponent<Text>().text = text;
231+
tText.GetComponent<TMP_Text>().text = text;
231232
}
232233

233234
public void SetColor(Color color)
@@ -238,7 +239,7 @@ public void SetColor(Color color)
238239
LogErr("ac_text not found!");
239240
return;
240241
}
241-
tText.GetComponent<Text>().color = color;
242+
tText.GetComponent<TMP_Text>().color = color;
242243
}
243244
}
244245

TrashItems/TrashItems.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
<HintPath>..\Libraries\BepInEx.dll</HintPath>
5757
<Private>false</Private>
5858
</Reference>
59+
<Reference Include="Unity.TextMeshPro">
60+
<HintPath>..\Libraries\Unity.TextMeshPro.dll</HintPath>
61+
</Reference>
5962
<Reference Include="UnityEngine">
6063
<HintPath>..\Libraries\UnityEngine.dll</HintPath>
6164
<Private>false</Private>

0 commit comments

Comments
 (0)