#if PACKAGE_UGUI && ENABLE_PROPERTY_VARIANTS using System; using UnityEngine.UI; namespace UnityEngine.Localization.PropertyVariants.TrackedObjects { /// /// Uses JSON to apply variant data to UGUI instances. /// Calls on the target object after applying changes. /// /// /// This shows how to configure a to apply changes to a [Text](https://docs.unity3d.com/Packages/com.unity.ugui@latest/index.html?subfolder=/api/UnityEngine.UI.Text.html) /// component for the Font, Font Size and Text properties. /// /// /// /// This shows how to configure a to apply changes to a [TextMeshProUGUI](https://docs.unity3d.com/Packages/com.unity.textmeshpro@latest/index.html?subfolder=/api/TMPro.TextMeshProUGUI.html) /// component for the Font, Font Size and Text properties. /// /// [Serializable] [DisplayName("UI Graphic")] [CustomTrackedObject(typeof(Graphic), true)] public class TrackedUGuiGraphic : JsonSerializerTrackedObject { protected override void PostApplyTrackedProperties() { ((Graphic)Target).SetAllDirty(); base.PostApplyTrackedProperties(); } } /// /// Uses JSON to apply variant data to . /// Calls on the target object after applying changes. /// /// /// This shows how to configure a to apply changes to a [Dropdown](https://docs.unity3d.com/Packages/com.unity.ugui@latest/index.html?subfolder=/api/UnityEngine.UI.Dropdown.html) /// for the options values. /// /// [Serializable] [DisplayName("UI Dropdown")] [CustomTrackedObject(typeof(Dropdown), true)] public class TrackedUGuiDropdown : JsonSerializerTrackedObject { protected override void PostApplyTrackedProperties() { ((Dropdown)Target).RefreshShownValue(); base.PostApplyTrackedProperties(); } } } #endif