oddgames / UIToolkit

Single draw call UI solution for Unity with multi resolution support and more.
518 stars 153 forks source link

Cannot recognize multiple text font resolutions 1x ,2x and 4x. #158

Open srikanth-chitturi opened 10 years ago

srikanth-chitturi commented 10 years ago

I have created multiple text font textures fontUnitySheet,fontUnitySheet2x,fontUnitySheet4x and set them in TextUIToolkit.

These coordinates file contains the actual font files i.e fontUnity.png and fontUnity.txt .

There was an exception , Exception: can't find texture details for texture packer sprite:fontUnity.png

There are no errors when run in 1x mode ,everything is working fine , but in HD mode : The GUIButtons are selected correctly ,but the text is not being recognized.

The exception is at : UISpriteManager.cs line08 :

public Rect frameForFilename( string filename ) {

if UNITY_EDITOR

    // sanity check while in editor
    if (!textureDetails.ContainsKey(filename))
    {
        throw new Exception("can't find texture details for texture packer sprite:" + filename);
    }

endif

    return textureDetails[filename].frame;
}

Is there any workaround for this ?