So i’ve been trying to find tutorials on youtube on how to modify TMP text values using C# and i want it to display the current scene. Here’s my script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using TMPro;
public class LevelCounter : MonoBehaviour
{
public TextMeshProUGUI textOBJ;
// Update is called once per frame
void Update()
{
textOBJ.GetComponent<TMPro.TextMeshProUGUI>("LEVEL:" + SceneManager.GetActiveScene());
}
}