3D objects as part of GUI

Hello,

I’m a new Unity user, so please forgive my noob questions, but I can’t find anything on this forum that explains how I could link gameobjects (3D Meshes) to my GUI.

I tried to manually position them to correctly match the GUI texture, but when I run the game at different resolutions, they no longer line up.

I thought I might have figured it out by using a ScreenToWorldPoint thing- but it’s still not happy.

Thanks in advance for any help you guys can give me.

Adjust the position and scale of your 3d object based upon values you derive from Screen.width and Screen.height.

you could :
place your 3d object in the somewhere scene
shoot it into a render texture
use the renderTexture in a 2D gui

Thanks for the suggestion Rom, but I am trying to avoid render textures if possible.

I think I am heading in the direction you suggest, Quietus, but the fact that screen space starts from the bottom left (0,0) and GUI space is measured from the upper left, was giving me a headache.

I think I have cracked it now though, but still need to figure out how to scale the object. Would it be simply a case of finding the correct scale for a particular resolution, then calculating a scaling percentage based on the player’s selected screen res?

I very much appreciate everyone’s input.