private void UpdateIds() { if (!Database.Contains(Target.ThemeId)) { Target.ThemeId = Database.Themes[0].Id; } m_theme = Database.GetThemeData(Target.ThemeId); //HighlightedSpritePropertyId if (!m_theme.ContainsSpriteProperty(Target.HighlightedSpritePropertyId)) { Target.HighlightedSpritePropertyId = m_theme.SpriteLabels.Count > 0 ? m_theme.SpriteLabels[0].Id : Guid.Empty; } //PressedSpritePropertyId if (!m_theme.ContainsSpriteProperty(Target.PressedSpritePropertyId)) { Target.PressedSpritePropertyId = m_theme.SpriteLabels.Count > 0 ? m_theme.SpriteLabels[0].Id : Guid.Empty; } #if UNITY_2019_3_OR_NEWER //SelectedSpritePropertyId if (!m_theme.ContainsSpriteProperty(Target.SelectedSpritePropertyId)) { Target.SelectedSpritePropertyId = m_theme.SpriteLabels.Count > 0 ? m_theme.SpriteLabels[0].Id : Guid.Empty; } #endif //DisabledSpritePropertyId if (!m_theme.ContainsSpriteProperty(Target.DisabledSpritePropertyId)) { Target.DisabledSpritePropertyId = m_theme.SpriteLabels.Count > 0 ? m_theme.SpriteLabels[0].Id : Guid.Empty; } }
private void UpdateIds() { if (!Database.Contains(Target.ThemeId)) { Target.ThemeId = Database.Themes[0].Id; } m_theme = Database.GetThemeData(Target.ThemeId); if (!m_theme.ContainsSpriteProperty(Target.PropertyId)) { Target.PropertyId = m_theme.SpriteLabels.Count > 0 ? m_theme.SpriteLabels[0].Id : Guid.Empty; } }