File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -1046,7 +1046,7 @@ GameObject:
10461046 - component : {fileID: 1291896733}
10471047 - component : {fileID: 1291896734}
10481048 m_Layer : 0
1049- m_Name : JCS_ValueTweener
1049+ m_Name : JCS_FloatTweener
10501050 m_TagString : Untagged
10511051 m_Icon : {fileID: 0}
10521052 m_NavMeshLayer : 0
@@ -1080,6 +1080,7 @@ MonoBehaviour:
10801080 m_Name :
10811081 m_EditorClassIdentifier :
10821082 mTestWithKey : 1
1083+ mTestCurrentValue : 0
10831084 mTweenToAKey : 97
10841085 mTweenToA : 0
10851086 mTweenToBKey : 98
@@ -2336,7 +2337,7 @@ GameObject:
23362337 - component : {fileID: 1981689529}
23372338 - component : {fileID: 1981689533}
23382339 m_Layer : 0
2339- m_Name : Tweener
2340+ m_Name : JCS_TransformTweener
23402341 m_TagString : Untagged
23412342 m_Icon : {fileID: 0}
23422343 m_NavMeshLayer : 0
@@ -2446,7 +2447,7 @@ MonoBehaviour:
24462447 mObjectType : 0
24472448 mMakeUnique : 0
24482449 mColorProps : []
2449- mTestWithKey : 0
2450+ mTestWithKey : 1
24502451 mTweenToAKey : 97
24512452 mTweenToA : {x: 0, y: 0, z: 0}
24522453 mTweenToBKey : 98
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ public class JCS_FloatTweener : MonoBehaviour
4646 [ SerializeField ]
4747 private bool mTestWithKey = false ;
4848
49+ [ Tooltip ( "The current value used for the test." ) ]
50+ [ SerializeField ]
51+ private float mTestCurrentValue = 0.0f ;
52+
4953 [ Tooltip ( "Key to active tween to point A." ) ]
5054 [ SerializeField ]
5155 private KeyCode mTweenToAKey = KeyCode . A ;
@@ -129,6 +133,24 @@ public JCS_TweenType Easing
129133
130134 /* Functions */
131135
136+ #if UNITY_EDITOR
137+ private void Awake ( )
138+ {
139+ if ( ! mTestWithKey )
140+ return ;
141+
142+ onValueChange += ( val ) =>
143+ {
144+ mTestCurrentValue = val ;
145+ } ;
146+
147+ onValueReturn += ( ) =>
148+ {
149+ return mTestCurrentValue ;
150+ } ;
151+ }
152+ #endif
153+
132154 private void LateUpdate ( )
133155 {
134156#if UNITY_EDITOR
You can’t perform that action at this time.
0 commit comments