We used 2.1.6 to development our gui, and last week I tried to upgrade it to 2.5.1. Some new features like the selection window of sprite is useful, however I find some problems now.
First, NGUI has combined four kinds of sprite into UISpirte, it is very simple to use, however when we create the shops or items, we used to use UIFilledSprtie and used NGUITOOL NGUITools.AddSprite to add new sprites,
private UISprite
[] m_bagSprite
= new UIFilledSprite
[ConstPreference
.Every_BagItem_Count]; m_bagSprite[i].type = UISprite.Type.Filled;
m_bagSprite[i] = NGUITools.AddSprite(anObj.gameObject, m_itemAtlas, "");
it shows bug:
ArrayTypeMismatchException: Source array type cannot be assigned to destination array type.
(wrapper stelemref) object:stelemref (object,intptr,object)
So I change the code
private UISprite
[] m_bagSprite
= new UISprite
[ConstPreference
.Every_BagItem_Count]
and the the type of the sprite to "Filled", the bug still there. So how can I use the filled sprite.
Second, seeing the image of sprite is very useful, however sometimes, when I want to add an Image Button, I really need to know the name of the sprite.Can the name of sprites displayed under the images?
The last problem, using the handle to directly modify th size of sprites in edit mode is cool, however our these sizes is alreadly decided, and sometime I want to change the position, I click the handles and change the sizes, it is very uncomfortable, can I disable those handles?