Hi Unity Community
I have recently updated my Unity Editor from 5.2.2 (I think) to 5.3.1 and a bunch of script errors occurred as a result. NB: scripts are in uJS.
A reoccurring issue seems to be related to the UI Text component. Previous references such as
var buttonText = instButton.GetComponentInChildren(Text); now produce the error
BCE0019: 'text' is not a member of 'UnityEngine.Component'.
Have tried to resolve this through casting the reference as
var buttonText : Text = instButton.GetComponentInChildren(Text);. However this only changes the error message to:
NullReferenceException: Object reference not set to an instance of an object UnityEngine.UI.Graphic.OnRebuildRequested () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:466) UnityEngine.UI.GraphicRebuildTracker.OnRebuildRequested () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/GraphicRebuildTracker.cs:33) UnityEngine.CanvasRenderer.RequestRefresh ()
The cause of which I am not entirely sure, however have read that this may be related to missing scripts in the package (not sure how this could be related to this issue).
If anyone can enlighten me as to why this may be occurring I would be incredibly grateful.
Many thanks in advance,