I have a JSON file containing Dialogue for an RPG I'm making, and I'd like to be able to place the players chosen name in it as it comes up. For example if the player's name was a
public string playerName = "Leon";
and in my JSON I had
"NPCIDxxGreeting":{
"text": "Yo, _____, what's up?"
}
I'd like to be able to insert "Leon" wherever that blank space showed up in the dialogue JSON. Is there any way to do this?
var greeting = "hello $name"andgreeting.Replace("$name", "Leon")