using UnityEditor; using UnityEngine.UIElements; namespace Rive { /// /// Helper class for styling Rive components. /// internal class StyleHelper { // USS Class Names /// /// The block class name for the Rive inspector. /// public const string CLASS_BLOCK = "rive-inspector"; /// /// The element class name for sections within the Rive inspector. /// public const string CLASS_SECTION = "rive-inspector__section"; /// /// The element class name for section labels within the Rive inspector. /// public const string CLASS_SECTION_LABEL = "rive-inspector__section-label"; /// /// The element class name for fields within the Rive inspector. /// public const string CLASS_FIELD = "rive-inspector__field"; /// /// Container that wraps a field and its optional help button. /// public const string CLASS_FIELD_CONTAINER = "rive-inspector__field-container"; /// /// Class name applied to the primary field element inside a container. /// public const string CLASS_FIELD_CONTENT = "rive-inspector__field-content"; /// /// Class name applied to the help/info buttons. /// public const string CLASS_FIELD_HELP_BUTTON = "rive-inspector__field-help-button"; private static StyleSheet s_StyleSheet; public static StyleSheet StyleSheet { get { if (s_StyleSheet == null) { string ussPath = "Packages/app.rive.rive-unity/Editor/Components/Styles/RiveInspectorStyleSheet.uss"; s_StyleSheet = AssetDatabase.LoadAssetAtPath(ussPath); } return s_StyleSheet; } } } }