[Unity] unified management of text for development experience

 All the text used in the game is best managed in one place, why?

 Because your game must have unified fonts, so is one font used in the end? You must change it many times to see which one works better. In this case, it will be very troublesome if you manually find the Text and then change it, even if you use Prefab.

 Including the text content, it is impossible to be in place at one time. It must be modified many times. After determining a format, it is enough to leave the work to the planner, and we only need to modify some variables.

  In addition, if the game uses multiple languages, it is also necessary to control the text display through the program according to the recognition of the system language. In this case, all texts must be managed by code. (Although my game doesn't involve localization yet)

  Now all the long texts, dialogues, etc. used in my game are put into a script, but the text on the UI is not managed yet, including: "Start Game", "OK", etc. And I used an inefficient way, which is array storage, because I haven't learned how to read external files. I will study XML in two days when I have time, and then refactor the relevant code.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325717229&siteId=291194637