Unity UI extended components, other script cannot get the reference of these component?
I created a ScrollRectEx, which is a extended class from ScrollRect according to the scripts on Internet. And I added some custom values.
Then I created another monobehaviour script, and try to get the ScrollRectEx component, it's ALWAYS null. Both components are on the same GameObject.
I tried "GetComponent()", it's null. I also tried using public and [SerializeField] on the ScrollRectEx field, and assign this field with that component by drag&drop, it's still null.
What is going on?
Comment
Your answer
Follow this Question
Related Questions
Not able to add Sprite in the Inspector. 0 Answers
Users Taps Vertically Offset on iPhone X? 0 Answers
Unity UI Responsive Menu 0 Answers
UnityEngine.UI Reference missing 0 Answers
Add a Listener to an UI Button so that it shows in the editor 0 Answers