File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Assets/Samples/RebindingUI Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class InputActionIndicator : MonoBehaviour
1818
1919 [ Tooltip ( "The color to show when the associated action has not been performed for the specified duration." ) ]
2020 public Color inactiveColor = Color . black ;
21-
21+
2222 [ Tooltip ( "The color to show when the associated action is disabled" ) ]
2323 public Color disabledColor = Color . red ;
2424
@@ -62,7 +62,7 @@ private void Update()
6262 m_Image . color = duration <= 0.0f
6363 ? inactiveColor
6464 : Color . Lerp ( inactiveColor , activeColor ,
65- ( float ) Math . Max ( 0.0 , 1.0 - elapsedSincePerformed / duration ) ) ;
65+ ( float ) Math . Max ( 0.0 , 1.0 - elapsedSincePerformed / duration ) ) ;
6666 }
6767 else
6868 {
@@ -71,19 +71,20 @@ private void Update()
7171 m_Image . color = disabledColor ;
7272 }
7373 }
74-
74+
7575 // We want the label for the action name to update in edit mode, too, so
7676 // we kick that off from here.
7777#if UNITY_EDITOR
7878 protected void OnValidate ( )
7979 {
8080 UpdateActionLabel ( ) ;
8181 }
82+
8283#endif
83-
84+
8485 private void UpdateActionLabel ( )
8586 {
86- if ( m_Text == null )
87+ if ( m_Text == null )
8788 return ;
8889 if ( action != null && action . action != null )
8990 m_Text . text = action . name ;
You can’t perform that action at this time.
0 commit comments