- Home /
Question by
maw0041 · Aug 14, 2019 at 08:35 PM ·
scenebuttonsuser interfaceworld spaceintantiate
Is it possible to put a world space UI onto an instantiated object?
I want to instantiate an object, then have buttons on it. Each instantiation should have the same buttons that do the same things. How to do this?
Comment
Answer by WainWork · Aug 16, 2019 at 07:03 AM
Hi! You need to add Canvas to your gameobject, and switch canvas "Render mode" setting to "World space".
Hey there, Thank you for your reply. I know how to do this and was wondering if there was a way if I can put buttons on each side of a cube?
Easy way to do this is make prefab from this cube with personal canvas and duplicate this prefab. Other way is harder. You need a lot of code to find object in main view and create UI prefab on current point and update his position himself by gameobject move.