Skip to content

Commit

Permalink
More explicit vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 6, 2024
1 parent 248cf1b commit e94466b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Fika.Core/UI/FikaUIUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ internal class FikaUIUtils
{
public static TextMeshProUGUI CreateOverlayText(string overlayText)
{
var obj = GameObject.Find("/Preloader UI/Preloader UI/Watermark");
var labelObj = GameObject.Find("/Preloader UI/Preloader UI/Watermark/Label");
GameObject obj = GameObject.Find("/Preloader UI/Preloader UI/Watermark");
GameObject labelObj = GameObject.Find("/Preloader UI/Preloader UI/Watermark/Label");

if (labelObj != null)
{
Object.Destroy(labelObj);
}

var watermarkText = obj.GetComponent<ClientWatermark>();
ClientWatermark watermarkText = obj.GetComponent<ClientWatermark>();
if (watermarkText != null)
{
Object.Destroy(watermarkText);
}

obj.active = true;
var text = obj.AddComponent<TextMeshProUGUI>();
TextMeshProUGUI text = obj.AddComponent<TextMeshProUGUI>();
text.horizontalAlignment = HorizontalAlignmentOptions.Center;
text.verticalAlignment = VerticalAlignmentOptions.Bottom;
text.margin = new Vector4(0, 0, 0, -350);
Expand Down

0 comments on commit e94466b

Please sign in to comment.