Комментарии:
The CSS-inspired solution is approached in the wrong way. In their solution, they have to search all the scenes and also inside the prefabs that may not be in any scene (this gets a bit tricky). The proper solution to this problem is to have an "overwriter". It's a component that you attach to an element that you want to overwrite the properties of, in this case a text element. This in turn has a scriptable object field that will take the configuration that will be the same across all buttons. When the overwriter Start()-s, it will GetComponent<> of a specific component that it wants to overwrite and take the values from a scriptable object and apply them to that component.
Ответить