- Home /
Drawing and saving during gameplay
Hi there. I'm looking into ways how one can freely draw during run time. The idea is that the player can draw something in the world and it remains there, as well as being able to save what they drew (perhaps as a png/ jpg). I looked into using a trail renderer to draw lines however it didn't seem possible to be able to then save or export the creation.
After looking into other methods, it might also be possible through creating a transparent texture and have the player draw onto that texture using SetPixels or RenderTexture, however I can't seem to find any clear documentation on how to actually implement these methods for line drawing.
Another option is to try to implement some of the products on the assets store. In particular Mobile Paint (https://www.assetstore.unity3d.com/en/#!/content/19803) and Paint in 3D (https://www.assetstore.unity3d.com/en/#!/content/26286) seem the most promising, but ideally I would like to achieve it without needing to adapt other assets (mainly for the sake of learning).
Below is a mockup screenshot of what I would ideally like to achieve. The player draws something in the air, and then that doodle is left in the world, as you can see by the others in the background.
Many thanks if you can help!
Your answer
Follow this Question
Related Questions
Suggestions for improvements of custom trail-drawing script highly appreciated. 0 Answers
Drawing a solid circle onto texture 2 Answers
SetPixels/Apply: Texture2D resets on restart 0 Answers
UnityEditor - Drawing on a Texture 1 Answer
For different texture sizes, which is faster? SetPixel or SetPixels? 2 Answers