You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NullReferenceException: Object reference not set to an instance of an object
at ColossalFramework.UI.UIComponent.AttachUIComponent (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at WorldInfoPanel.Start () [0x00000] in <filename unknown>:0
at RoadWorldInfoPanel.Start () [0x00000] in <filename unknown>:0
although this code works it causes a null reference exception in every LateUpdate() call after the exception above:
NullReferenceException: Object reference not set to an instance of an object
at WorldInfoPanel.LateUpdate () [0x00000] in <filename unknown>:0
// the exception comes from this line:
base.componnet.IsVisible is causing problem
I got my code from this base game code.
public void OnAdjustRoadButton()
{
Singleton<InfoManager>.instance.SetCurrentMode(InfoManager.InfoMode.TrafficRoutes, InfoManager.SubInfoMode.WindPower);
base.Hide();
}
see #631 (comment)
When I tried to Hide
RoadWorldInfoPanel
:my code is :
although this code works it causes a null reference exception in every
LateUpdate()
call after the exception above:I got my code from this base game code.
EDIT:
and the call stack is:
so considering that I queue
RoadWorldInfoPanel.Hide
to main thread I do not understand why it causes exceptions.The text was updated successfully, but these errors were encountered: