Hey,
i get an exception when I select an entry in the UiPopup (see the stacktrace).
The list is filled by the application, not inside the editor.
This happens only on android and not in the editor.
I'm working with dynamic fonts.
I use the newest ngui-Version (3.9.2) and unity 5.2. This happened also with the previous unity version 5.1.03.
In Unity 4 and the first unity 5 version together with an older ngui version (I don't know which it was) this does not happen.
The exception happens only the first time I open the UiPopupList after the start of the application.
I looked inside the code. This is quite strange. In the beginning of the method
NguiText.Update() you test
if (dynamicFont != null && request)
But a few lines later in
if(!dynamicFont.GetCharacterInfo(')', out mTempChar, finalSize, fontStyle) || mTempChar.maxY == 0f)
dynamicfont is null, so an exception is thrown.
When I look at the code I can't see, how the value could change to null.
Multithreaded Rendering is not activated.
Any idea?
I attached images of the hierachy in the editor, the settings and a screenshot of the open UiPopupList
NullReferenceException: Object reference not set to an instance of an object
Stacktrace:
NGUIText.Update (Boolean request)
Rethrow as Exception: Abschnitt4: Dynamic Font == null: 'True', ThreadId = 1
NGUIText.Update (Boolean request)
NGUIText.Update ()
UILabel.UpdateNGUIText ()
UILabel.OnFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols)
UIWidget.UpdateGeometry (Int32 frame)
UIPanel.UpdateWidgets ()
UIPanel.UpdateSelf ()
UIPanel.LateUpdate ()
UIPanel.Refresh ()
UILabel.OnFontChanged (UnityEngine.Font font)
UnityEngine.Font.InvokeTextureRebuilt_Internal (UnityEngine.Font font)
UnityEngine.Font:RequestCharactersInTexture(String, Int32, FontStyle)
NGUIText:Prepare(String)
NGUIText:WrapText(String, String&, Boolean, Boolean, Boolean)
UILabel:ProcessText(Boolean, Boolean)
UILabel:ProcessText()
UILabel:ProcessAndRequest()
UILabel:set_text(String)
UILabel:SetCurrentSelection()
EventDelegate:Execute()
EventDelegate:Execute(List`1)
UIPopupList:TriggerCallbacks()
UIPopupList:set_value(String)
UIPopupList:OnItemPress(GameObject, Boolean)
UIEventListener:OnPress(Boolean)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object)
UICamera:ProcessPress(Boolean, Single, Single)
UICamera:ProcessTouch(Boolean, Boolean)
UICamera:ProcessTouches()
UICamera:Update()