Why does the text objects I reference dissapear from being refferenced when I play the game?

they just become “none” for some reason. This has happened with regular Texts, textmeshpro and also prefabs.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;

public class InputTextCon : MonoBehaviour
{
    public TextMeshProUGUI input;
    void Start()
    {
        input = GetComponent<TextMeshProUGUI>();
    }
}

There’s no -TextMeshProUGUI- component on object with the script (it’s on other object), so it sets it to none. If you already have a reference to it made in inspector, you don’t need to make another reference on Start.

Remove the line inside the Start function