Skip to content

UI Styles

Merlin edited this page Jun 12, 2021 · 1 revision

UI Styles

USharpVideo has a basic system for styling UI on many UI components at once. This system may be extended over time based on people's needs.

Applying a Style

  1. Go to the ControlsUI object on the USharpVideo prefab
  2. Select a UI style on the UI Styler

Examples

There are a few example themes included with the package, they can be found in the USharpVideo/Styles directory. Shown below are 3 of the examples.

Default Theme

Dark Theme

YT Theme

Making your own style

You can make your own styles for use with your UI. I recommend just duplicating an existing style as a starting point by selecting the original style and pressing Ctrl+D. Alternatively you can create a new UI style from scratch by removing the default style on a UI Styler and clicking the Create new Style button that appears.

Once you have your new style created, assign it to the UI Styler and start changing the colors on it. UI element colors will update as you change the style.

Setting up your own UI elements to be stylable

The UI styler operates by finding all UI Style Markup components in the child UI elements. In order to receive styles, you need to put UI Style markup components on each UI element and set the style class to the appropriate type of UI element.

Clone this wiki locally