Hello everyone, it’s probably pretty simple thing, I know. But I have two problems. The first one is, let’s say.
public class Player
public string playerName; //And let's say playerName is "Jack"
So when I try to manually write this playerName into Text Input of TextMeshProUGUI in editor, it doesn’t show its value. the way I try to do is to write in editor text input " Player Name is : Player.Instance.playerName " I know it’s not the way to do it, but you get the idea, is there a way to achieve what I’m trying to do through editor and not via script? To make the value stored by string variable to appear when I write variable on text input in Unity’s Editor Inspector?
the second problem is;
I have Serializable ScriptableObject storing dialogue strings for my NPCS. For example one of them is;
public string greeting;
and so I fill these string values of ScriptableObject on editor inspector, let’s say
public string greeting;
And it is: “Hello Player.Instance.playerName, it’s nice to meet you!” and yes, it’s just not working. In game dialogue box, I want it to show “Hello Jack, it’s nice to meet you” but it just shows variable as the way it is.
Is there an ideal way to do what I’m trying to do? All helps and suggestions are appreciated!