- Home /
resolution not working
I'm following the space shooter tutorial. My OS is linux mint 18. Target platform is WebGL. By instructions, I set the resolution to 600*900 in PlayerSettings but it doesn't change anything. The Score Text GUIText is supposed to be on the upper left corner of the green background. Thanks!
Answer by ASPePeX · Feb 15, 2017 at 09:21 AM
Did you build it? It should be working when built.
Top right corner of your screenshot "Free Aspect", you can set resolution for the editor window there.
Thanks a lot! I checked again and just found out that it actually worked when built. So does it mean that I have to adjust the resolution of the editor when I change the resolution in PlaySettings so that the GUIText is shown in the right place as it is built? The reason I didn't know it worked in the first place is that, I can't get the full view of the game when firefox window is not maxmized. Only when maxmize the firefox window, can I get a complete scene. I wonder if it is unity or firefox caused the problem and how to solve it. Thanks again!
Yes you need to set resolution in editor every time you change it from player settings if you wish to match them. But I have a feeling that you might have made some mistakes when you made the UI as you said GUIText that is obsolete, new UI system has been here since Unity 4.6.
With UI system you can set up anchor points. For example you can set up Score Text to be anchored in top-left corner, which would keep it always at same position when compared to that corner no matter what your resolution is.
https://unity3d.com/learn/tutorials/topics/user-interface-ui
I did set up the Anchor by the instructions in the tutorial. And thanks for advice.
Your answer
Follow this Question
Related Questions
Target resolution 0 Answers
How to set the launcher's minimum resolution? 1 Answer
Gameobject positions are getting shifted on different resolutions 0 Answers
why the screen frame rate is not changing 0 Answers
GameObject get displaced 1 Answer