- Home /
How do I get a texture2D snapshot from a single rendered GameObject/SpriteRender/MeshRender in a scene?
Hi,
I was trying to convert a rendered object to particles, by getting a 2d texture of the rendered object. So, for example, I can make a Sprite dissolve in the wind when an enemy dies.
Anyway, I really have no idea on how to do this. Is it even possible to render a single object isolating it in the scene, and print it on a 2D texture?
Any help is appreciated, even pointing me to the right direction.
I'd like to code it in C#, and I can't use any ready-to-use Asset Store 3D to 2D sprite converter.
Could you please suggest me the classes, methods, pieces of code, samples, on how to achieve this result?
Thanks for your time :)
Yes its possible, there are a lot of 3d -> 2d "sprite factory" assets on the store. Heres one as an example. https://www.assetstore.unity3d.com/en/#!/content/31247
How they do it? Im not sure, I have never tried it before.
Thanks for your answer, I know there's a store, but my goal is to code my own, also because I need to write my own code for it, and extend it (as I said, I don't need a 3D to Sprite/Spritesheet converter, but classes, methods, or techniques to do that). I'll change the description to be more clear.