I’m still confused about the use of the variable types Text and String.
In the previous lesson, we wrote something like this:
public class GoneMissing : MonoBehaviour
{
[SerializeField] Text textComp;
void Start()
{
textComp.text = ("Story");
}
void Update()
{
}
}
But in the scriptable Object script we have something like this:
[CreateAssetMenu(menuName = "State")]
public class State : ScriptableObject
{
[TextArea(14,13)] [SerializeField] string storyText;
}
What’s the precise difference between Text and String?