- Home /
Using 2d image for dragging?
Hi,
i was just wondering: i would like to use this image to open a door, so the more we drag it down, the more the door will open.
I thought i could put 2 circles and 1 rectangle in an empty in Unity, and scale the rectangle and make the bottom circle follow the movement. But this means creating the 3 shapes with Blender, and add a material as if it was a 3d object (whereas i would like to use it as a 2d object). Is there another way?
Thanks
EDIT:
the shadow issue :
Look at GUILayout.VerticalSlider, add this to your custom stile and all should be fine =)
If you are using GUI, then @Pauls suggestion is a good one. If you are not using GUI, use a plane and construct a material with the handle as the texture. $$anonymous$$ake sure you select a shader that supports transparency.
We don't use GUI so I cannot speak to GUI's performance on mobile. We use an add-on package called EZGUI and have not had performance issues on iOS. NGUI is popular as well. Transparency is a bit more expensive, but you see it used all the time on mobile. From a performance standpoint, I'd worry more about Drawcalls than transparency. EZGUI (and I believe NGUI as well) build texture atlases and set UV coordinates so that multiple UI elements handled in a single draw call. You can read more about Draw Call batching here:
http://docs.unity3d.com/Documentation/$$anonymous$$anual/DrawCallBatching.html
Your answer
Follow this Question
Related Questions
2D object look at 3D object 0 Answers
2d sprite bacground motion? 2 Answers
UDP app signature? 1 Answer
2D and 3D lights in a scene. URP,2D and 3D lights in scene URP 1 Answer
3d and 2d game 0 Answers