Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on August 14, 2013, 12:32:57 AM

Title: cannot replace font by a 512x512 font sheet
Post by: laurentl on August 14, 2013, 12:32:57 AM
When I press the Replace Font button I get this and the font gets corrupted:

m_Memory.renderTextureBytes<0
UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
NGUIEditorTools:MakeTextureReadable(String, Boolean) (at Assets/all the Plugins/NGUI/Scripts/Editor/NGUIEditorTools.cs:501)
NGUIEditorTools:ImportTexture(String, Boolean, Boolean) (at Assets/all the Plugins/NGUI/Scripts/Editor/NGUIEditorTools.cs:548)
NGUIEditorTools:ImportTexture(Texture, Boolean, Boolean) (at Assets/all the Plugins/NGUI/Scripts/Editor/NGUIEditorTools.cs:568)
UIAtlasMaker:ExtractSprites(UIAtlas, List`1) (at Assets/all the Plugins/NGUI/Scripts/Editor/UIAtlasMaker.cs:409)
UIAtlasMaker:AddOrUpdate(UIAtlas, Texture2D) (at Assets/all the Plugins/NGUI/Scripts/Editor/UIAtlasMaker.cs:551)
UIFontMaker:OnGUI() (at Assets/all the Plugins/NGUI/Scripts/Editor/UIFontMaker.cs:278)
UnityEditor.DockArea:OnGUI()
Title: Re: cannot replace font by a 512x512 font sheet
Post by: ArenMook on August 15, 2013, 07:46:07 AM
Yeah, something, somewhere in Unity, destroys textures at some point, while NGUI is still using them.

What does it, why it does it, is not known. If you can figure it out, it'll be helpful. That issue is hard to reproduce reliably.