1. Solved 2 null reference exception, one where inspectorIconList is null at first when you create a TextPic.cs object directly from the menu. And another at GetOutputText() function where sometime count gets higher then m_HrefInfos.Count.
Changed implementation, so that when TextPic is added as a child of a button, it adds a CanvasGroup and allows clicks to pass through it. Downside is that hyperlinks don't work. TextPic on buttons is purely decorative.
The Button issue disables the ability to highlight links, so updated implementation to allow a "Selectable" component to be added to the TextPic to set highlight colours.
Resolves#110
So what i did is i assigned m_Text = GetOutputText(); directly in OnPopulateMesh() function, which solved the problem.
--HG--
branch : sushanta1991/-onpopulatemesh-was-getting-called-befor-1480940993474
Unity-UI-Extensions helped me a lot thanks for creating it.
Today i was trying href tag provided with TextPic.cs, but unfortunately it was not working.
I figured out that, OnPopulateMesh() was creating hrefInfo.boxes but at the end when OnPopulateMesh() calls UpdateQuadImage(), hrefInfo.boxes.count was coming 0. This was little strange but i saw that GetOutputText() was re-creating m_HrefInfos array from scratch but it didn't include the code to add boxes, so this was the issue.
so what i did is, i commented this line m_HrefInfos.Clear(); in GetOutputText() and added few lines of code to check if m_HrefInfos elements exists than don't destroy it, just update it with new values.
This helped in resolving the issue. Now i was getting onClick event on href tag.
Thanks
--HG--
branch : sushanta1991/textpiccs-was-not-working-for-href-unit-1474979920532