Closed unitycoder closed 8 years ago
texture amount gets increased each initialize call..
coming from this line:
drawingTexture = new Texture2D(texWidth, texHeight, TextureFormat.RGBA32, false);
temporary fix:
// FIND LINE
drawingTexture = new Texture2D(texWidth, texHeight, TextureFormat.RGBA32, false);
// CHANGE TO
if (drawingTexture==null)
{
drawingTexture = new Texture2D(texWidth, texHeight, TextureFormat.RGBA32, false);
}
better fix, because the previous one wouldnt re-initialize it to new size etc.
// FIND LINE
drawingTexture = new Texture2D(texWidth, texHeight, TextureFormat.RGBA32, false);
// CHANGE TO
if (drawingTexture != null) Texture2D.DestroyImmediate(drawingTexture , true);
drawingTexture = new Texture2D(texWidth, texHeight, TextureFormat.RGBA32, false);
thanks to theLaymaster: http://forum.unity3d.com/threads/released-mobile-paint-with-multi-touch.262645/page-4#post-2518199
fixed in the coming v1.96 update
http://forum.unity3d.com/threads/released-mobile-paint-with-multi-touch.262645/page-4#post-2513834