@@ -369,7 +369,7 @@ private enum Flags
369369
370370 public IEnumerable < InternedString > appliedOverrides => m_AppliedOverrides ;
371371
372- public ReadOnlyArray < InternedString > usages => new ReadOnlyArray < InternedString > ( m_Usages ) ;
372+ public ReadOnlyArray < InternedString > commonUsages => new ReadOnlyArray < InternedString > ( m_CommonUsages ) ;
373373
374374 /// <summary>
375375 /// List of child controls defined for the layout.
@@ -947,9 +947,9 @@ public static InputControlLayout FromType(string name, Type type)
947947 isNoisy = layoutAttribute ? . isNoisy ?? false
948948 } ;
949949
950- if ( layoutAttribute ? . usages != null )
951- layout . m_Usages =
952- ArrayHelpers . Select ( layoutAttribute . usages , x => new InternedString ( x ) ) ;
950+ if ( layoutAttribute ? . commonUsages != null )
951+ layout . m_CommonUsages =
952+ ArrayHelpers . Select ( layoutAttribute . commonUsages , x => new InternedString ( x ) ) ;
953953
954954 return layout ;
955955 }
@@ -978,7 +978,7 @@ public static InputControlLayout FromJson(string json)
978978 internal bool ? m_UpdateBeforeRender ;
979979 internal InlinedArray < InternedString > m_BaseLayouts ;
980980 private InlinedArray < InternedString > m_AppliedOverrides ;
981- private InternedString [ ] m_Usages ;
981+ private InternedString [ ] m_CommonUsages ;
982982 internal ControlItem [ ] m_Controls ;
983983 internal string m_DisplayName ;
984984 private string m_Description ;
@@ -1319,7 +1319,7 @@ public void MergeLayout(InputControlLayout other)
13191319 m_StateFormat = other . m_StateFormat ;
13201320
13211321 // Combine common usages.
1322- m_Usages = ArrayHelpers . Merge ( other . m_Usages , m_Usages ) ;
1322+ m_CommonUsages = ArrayHelpers . Merge ( other . m_CommonUsages , m_CommonUsages ) ;
13231323
13241324 // Retain list of overrides.
13251325 m_AppliedOverrides . Merge ( other . m_AppliedOverrides ) ;
@@ -1565,7 +1565,7 @@ private struct LayoutJson
15651565 public string format ;
15661566 public string beforeRender ; // Can't be simple bool as otherwise we can't tell whether it was set or not.
15671567 public string runInBackground ;
1568- public string [ ] usages ;
1568+ public string [ ] commonUsages ;
15691569 public string displayName ;
15701570 public string description ;
15711571 public string type ; // This is mostly for when we turn arbitrary InputControlLayouts into JSON; less for layouts *coming* from JSON.
@@ -1609,7 +1609,7 @@ public InputControlLayout ToLayout()
16091609 isGenericTypeOfDevice = isGenericTypeOfDevice ,
16101610 hideInUI = hideInUI ,
16111611 m_Variants = new InternedString ( variant ) ,
1612- m_Usages = ArrayHelpers . Select ( usages , x => new InternedString ( x ) ) ,
1612+ m_CommonUsages = ArrayHelpers . Select ( commonUsages , x => new InternedString ( x ) ) ,
16131613 } ;
16141614 if ( ! string . IsNullOrEmpty ( format ) )
16151615 layout . m_StateFormat = new FourCC ( format ) ;
@@ -1676,7 +1676,7 @@ public static LayoutJson FromLayout(InputControlLayout layout)
16761676 extend = layout . m_BaseLayouts . length == 1 ? layout . m_BaseLayouts [ 0 ] . ToString ( ) : null ,
16771677 extendMultiple = layout . m_BaseLayouts . length > 1 ? layout . m_BaseLayouts . ToArray ( x => x . ToString ( ) ) : null ,
16781678 format = layout . stateFormat . ToString ( ) ,
1679- usages = ArrayHelpers . Select ( layout . m_Usages , x => x . ToString ( ) ) ,
1679+ commonUsages = ArrayHelpers . Select ( layout . m_CommonUsages , x => x . ToString ( ) ) ,
16801680 controls = ControlItemJson . FromControlItems ( layout . m_Controls ) ,
16811681 beforeRender = layout . m_UpdateBeforeRender != null ? ( layout . m_UpdateBeforeRender . Value ? "Update" : "Ignore" ) : null ,
16821682 } ;
0 commit comments