- Home /
Duplicate Question, see comments
Fitting images in vectors
I want to keep the two options (which are both separate images) within certain vectors of the the title box (which is a separate image itself).
The text are all images, each is a GUITexture. The images always move with different resolutions and Ratios, with all combinations.
Put yourself in our situation and try thinking about whether you would be in a position to answer your own question, considering the information you have given us. If you come to the conclusion "yeah, sure!", think again. If you come to the conclusion "hm, probably not.", edit your question and add all missing infos that could help somebody who has no idea whatsoever how your scene is constructed.
To provide a few hints what might be missing:
You would have to tell us at least how you are generating both text and boxes. 3D Objects? GUIElements/GUITextures/GUIText? UnityGUI/OnGUI()/GUI.something? What anchoring settings are you using for your texts (if they are texts at all, and not some textures with text in it - are they?)? Does the problem occur/ look differently only when you change the aspect ratio of your Game window, or also when you change its resolution, keeping the aspect ratio fixed?
That is still not enough info, as we still know nothing about how you actually place your textures, whether you use pixel or screen coordinates, viewport scaling or pixel placement, etc., whether all your textures use the same placing mechanism, whether you are creating your game to be run on differen screen resolutions and/or aspect ratios or not, and so on.
But I will try to cough up an answer anyway.
Actually, this is too much of a duplicate question, so I will point you in the right direction, for example my answer to this question (but you should also search UNity Answers for other related questions, many users had the exact same problems before you). In particular, option "2)" would be the one interesting for you. To not only scale your textures to the right size but also place them independently of that size, you would proceed similarly with the localPosition of your GUITextures as explained in that answer.
After reading and understanding that answer (and possibly others you found), if it still didn't work out in your situation, feel free to re-open this question, and edit it to explain which particular part did not work out as expected, and possibly also give a code excerpt, or describe which transform and or pixelInset settings you used.