How I manage the game UI styles with Scriptable Objects — 2018-03-25

How I manage the game UI styles with Scriptable Objects

The Problem of Creating UI

I had a project needs to restructure the whole UI this year, in a general way to create UI is to set up each element’s attributes like font size, color… etc.

setup-every-attributes
In a general way, I need to set up every attribute for this text element

In the below picture, I need to change all elements one by one if suddenly the art designer wants to change the font color or something else. I can solve this by making a block to a prefab, then instantiate and modify the text of each instance. By doing so I can change all block style at once by changing the prefab.

Screen Shot 2018-03-25 at 12.40.18
Make a prefab for this kind of block, then I can change all block style by changing styles of the prefab

But what if it obviously needs many different prefabs with the same style settings? Going through all prefabs and modifying the styles is still much time cost.

Screen Shot 2018-03-25 at 12.40.45
Need to manually change all prefabs with the same style settings

繼續閱讀

Drawing wireframe with barycentric coordinates — 2016-12-12
Unity Dissolve Effect — 2016-11-24
使用 WordPress.com 設計專業網站
立即開始使用