- Home /
2D Texture drawing/painting on iOS/Android (fast)?
I have previously written an app before in Unity that allows the user to draw onto a 'wall' - but in this instance I need a more responsive solution with larger textures (for a drawing game for Android where the user creates the game objects - similar to Drawn to Life - 2D game).
... so I was just wondering if anyone has done something similar with good results (am currently developing in Java on Android but being able to use Unity will speed things up x2).
Appreciate any hints/suggestions, J
Afaik your best bet is setPixels, which uploads to the texture, which is quite slow...
Answer by SantosR · Jul 29, 2014 at 09:22 PM
Use a camera with ClearFlags "Don't Clear" to draw to a RenderTexture, then you instance a sprite as a brush.
Make it follow the mouse(finger) and appear/disappear on press/release. This is the fastest way to draw to a texture afaik.
Setting pixels or blitting through code are not performant enough for mobile devices.
You will most likely need to do some shader work in order to implement an eraser and solve transparency issues, but I couldn't find another way around that personally.
Your answer
Follow this Question
Related Questions
Antialiasing on iOS 1 Answer
I can change the iOS splash screen but I can't change the Android splash screen. Why? 0 Answers
getPressure for touch pressure on Android or iOS 3 Answers
Push Notifications (to Specific devices) 1 Answer
Can I have different bundle identifiers for iOS and Android? 1 Answer