File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Assets/JCSUnity/Scripts/GUI/JCS_Buttons Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -18,23 +18,22 @@ namespace JCSUnity
1818 /// button triggered.
1919 /// </summary>
2020 public class JCS_EchoButton
21- : JCS_Button
21+ : JCS_Button
2222 {
2323 [ Header ( "** Runtime Variables (JCS_EchoButton) **" ) ]
2424
2525 [ Tooltip ( "String to echo out on the console window." ) ]
2626 public string echoString = "echo Hello World!~" ;
2727
28- /// <summary>
29- /// Default function to call this, so we dont have to
30- /// search the function depends on name.
31- ///
32- /// * Good for organize code and game data file in Unity.
33- /// </summary>
34- public override void JCS_ButtonClick ( )
28+ protected override void Awake ( )
3529 {
36- base . JCS_ButtonClick ( ) ;
30+ base . Awake ( ) ;
3731
32+ SetCallback ( OnClick ) ;
33+ }
34+
35+ private void OnClick ( )
36+ {
3837 JCS_Debug . Log ( echoString ) ;
3938 }
4039 }
You can’t perform that action at this time.
0 commit comments