| GettingStarted |
This guide will walk you through the basics to get started using HyperText for most common use cases.
HyperText adds a range of functionality to Unity's built-in Text! Before you get started, it is recommended you review the following pages in the Unity Manual:
HyperText provides not only a custom component to use in place of Unity's built-in Text, but also a range of other related tools to solve common problems in games that make heavy use of text, such as role-playing games, card games, and adventure games.
Foremost, HyperText components allow you to insert links into text using the familiar <a> tag. Links respond to a variety of input events such as mouseover and clicking, and animate their text color as they move through different state transitions. You can hook into callbacks for each input event to display tooltips or add clickable controls directly to your text.
HyperText also gives you fuller control over text styling using powerful, reusable HyperTextStyles assets. These assets allow you to define basic styling properties for default text, such as font size, color, and face, as well as color and transition properties for links. Moreover, you can define custom link classes and tags with their own styles, as well as custom styles for inline Sprites inserted using the <quad> tag. HyperTextStyles can also inherit style definitions from other style sheets, allowing you to logically separate your styles for easy overriding or platform-specific substitution. You can also specify a default style sheet that all of your new HyperText components should use.
HyperText components can also specify keyword collections, which indicate words that should be automatically styled when encountered in the input text. This feature allows you to easily highlight and/or link to names of special characters, items, or other terms encountered in the text without requiring you to also manually tag them.
Because HyperText extends the built-in Text component, it can be used anywhere that Unity's UI components require a Text object. Moreover, the menu option Assets -> Candlelight -> HyperText -> Upgrade All UI Text lets you automatically upgrade all built-in Text components in your prefabs and scenes to HyperText objects!
Finally, you can specify a custom input source for HyperText. This feature allows you to define reusable assets specifying unique text values for different locales, pull text directly from a database, and much more!
Extensive tooltips have been added to most items in the editor! If you are ever unsure of what something does in the Inspector, check if there is a tooltip or status icon providing more information. All custom component types also include a link to their API Reference pages from the context menu in the Inspector (the small gear icon in the upper right of a component's section).