44
55namespace OC . Editor
66{
7+ #if UNITY_6000_3_OR_NEWER
8+ [ UxmlElement ( "OCEditorProgressBarWithLimits" ) ]
9+ public partial class OCProgressBar : UnityEngine . UIElements . ProgressBar
10+ {
11+ #else
712 public class ProgressBar : UnityEngine . UIElements . ProgressBar
813 {
914 public new class UxmlFactory : UxmlFactory < ProgressBar , UxmlTraits > { }
@@ -28,7 +33,11 @@ public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext
2833 progressBar . ColorBackground = _colorBackground . GetValueFromBag ( bag , cc ) ;
2934 }
3035 }
31-
36+ #endif
37+
38+ #if UNITY_6000_3_OR_NEWER
39+ [ UxmlAttribute ( "Color-Bar" ) ]
40+ #endif
3241 public Color ColorBar
3342 {
3443 get => _colorBar ;
@@ -39,6 +48,9 @@ public Color ColorBar
3948 }
4049 }
4150
51+ #if UNITY_6000_3_OR_NEWER
52+ [ UxmlAttribute ( "Color-Background" ) ]
53+ #endif
4254 public Color ColorBackground
4355 {
4456 get => _colorBackground ;
@@ -48,7 +60,10 @@ public Color ColorBackground
4860 _colorBackground = value ;
4961 }
5062 }
51-
63+
64+ #if UNITY_6000_3_OR_NEWER
65+ [ UxmlAttribute ( "Show-Limits" ) ]
66+ #endif
5267 public bool ShowLimits
5368 {
5469 get => _showLimits ;
@@ -101,9 +116,9 @@ public bool Max
101116 private const string LIMIT_USS_CLASS_NAME = "progress-bar__limit" ;
102117 private const string LIMIT_ACTIVE_USS_CLASS_NAME = "progress-bar__limit-active" ;
103118
104- public ProgressBar ( ) : this ( "" ) { }
119+ public OCProgressBar ( ) : this ( "" ) { }
105120
106- public ProgressBar ( string title )
121+ public OCProgressBar ( string title )
107122 {
108123 this . title = title ;
109124 styleSheets . Add ( Resources . Load < StyleSheet > ( USS ) ) ;
0 commit comments