いつもお世話になっております。
Update関数が呼ばれず、困っています。
Debug.Logを使用しても、Logも吐きません。
しかし、エラーもないです。
特に変わった書き方はしていないと思うのですが、
Updateを呼び出すには、どのように修正すればよいでしょうか。
C#
1using DG.Tweening; 2using System.Collections; 3using System.Collections.Generic; 4using UnityEngine; 5using UnityEngine.UI; 6using UnityEngine.EventSystems; 7 8. 9. 10. 11 12public class CardController : MonoBehaviour { 13 14. 15. 16. 17 18void Update() 19{ 20 Debug.Log("デバッグ"); 21 float speed = 0.3f; 22 float modePos = scroll_mode.GetComponent<ScrollRect>().verticalNormalizedPosition; 23 float levelPos = scroll_level.GetComponent<ScrollRect>().verticalNormalizedPosition; 24 if(modePos < 0.25f) 25 { 26 float target = Mathf.SmoothStep(modePos, 0f, Time.time * speed); 27 modePos = target; 28 } 29 else if(modePos >= 0.25f && modePos < 0.75f) 30 { 31 //ModeImg.sprite = mode_reibou; 32 float target = Mathf.SmoothStep(modePos, 0.5f, Time.time * speed); 33 modePos = target; 34 } 35 else if(modePos >= 0.75f) 36 { 37 //ModeImg.sprite = mode_kaiteki; 38 float target = Mathf.SmoothStep(modePos, 1.0f, Time.time * speed); 39 modePos = target; 40 } 41} 42
この現象に詳しい方いられましたら、ご教示頂けますと幸いです。
宜しくお願い致します。
その他の箇所が原因の可能性が高いです
省略せずにすべてのコードを提示しましょう
