Simple Text Style

SIMPLE TEXT STYLE is a complete substitute for default Unity fonts. It is designed to work similarly to the default Unity fonts but with extra stunning features to suit the needs for UI design. The use of this assets helps in the ease of the following:

Features

  • Can add projected text shadows
  • Can high quality outline
  • Can easily add Gradients to text
  • Can add Detail texture
  • Can tweak text resolution
  • Supports unity 4.3 sprite layer ordering
  • Can support undo, redo and multi-object editing

How to:

For Demo1 

This demo is about generating textStyleSetting and creating your own SimpleTextStyle

  1. Open Demo1.unity 
  2. In Unity, Navigate to InternalScript folder in Project section
  3. Right click on SimpleTextStyleSetting.cs and choose Generate “SimpleTextStyleSetting”
  4. Once generated, change the default generated filename (choose whatever filename you like that suits for your gameObject)

Now, you have your own generated SimpleTextStyle setting. You can now add your own SimpleTextStyle

  1. In your current scene, create UI>Text
  2. Put SimpleTextStyle to the GameObject (How to:)
    1. Drag the SimpleTextStyle script to the UI text you just created and you now have the script for your gameObject
    2. OR
    3. Navigate to Inspector, add a component below
    4. Choose Script and add the SimpleTextStyle script 
  3. For the setting, choose SimpleTextStyleSetting  (You can just drag the script and drop it to the Setting field in component)
  4. For the last step, tap the generated TextStyleSetting and modify some fields you want to edit whatever you edited (Font, style, size, colour, etc), the text on the UI will also take effect.

Easy right? 😉 

For Demo2 

This demo is about changing all style setting by theme or language setting.

  1. Open Demo2.unity 
  2. In Unity, Navigate to InternalScript folder in Project section
  3. Right click on SimpleTextStyleSettingLocator.cs and choose Generate “SimpleTextStyleSettingLocator”
  4. Once generated, tap the generated file and Navigate to Inspector
  5. As you can in our sample, we add HeaderEN as our Def Setting (You Can as well create your own SimpleTextStyleSetting from Demo1)
  6. Add the Key List size then the Setting List
  7. When changing the setting, call SimpleTextStyleSettingLocator.SetKey (string key) method

Okay cool! Easy right? 😉