- Home /
How do I make the build look like the debug? It looks terrible.
In the debug:
In the build:
When I start a level though, everything looks fine.
A bit more information needed. Perhaps post the code that deals with the placement of your elements on screen.
Surely your GUI display is not relative, thats why you have this unwanted position if the size of your window changes.
So how do I change it? Also I got different codes from different buttons.
To position your GUI elements, use a fraction of Screen.Width and Screen.Height, There are many questions about this problem already :p
Fortunately this will be fixed by the gui in the next update (hopefully). The gui appears to not be scaled correctly to the screen, when you change resolutions this happens. A way to fix this would be to use Screen.Width and Screen.Height coordinates in your gui script that way the gui elements stay relative to the screen size. Another way to do is would to be to set your own 4x4matrix. Great tutorial on how to change gui matrix thanks to aldonaletto! Unity docs about $$anonymous$$atrix4x4.TRS
Answer by Aspire-Games-com · Jun 26, 2014 at 08:59 PM
Why dont you make a GUI Image in Photoshop and Bring it into ur scene attach a collider and this script and the placement shouldn't change
var levelToLoad : String;
//use mylevel animus_island string
//quit works whan build
var soundhover : AudioClip;
var beep : AudioClip;
var QuitButton : boolean = false;
function OnMouseEnter(){
audio.PlayOneShot(soundhover);
}
function OnMouseUp(){
audio.PlayOneShot(beep);
yield new WaitForSeconds(0.35);
if(QuitButton){
Application.Quit();
}
else{
Application.LoadLevel(levelToLoad);
}
}
@script RequireComponent(AudioSource)
Awesome! How can I make that when I hover the mouse the color changes? (sorry I'm bad at javascript, I use C#)
Your answer

Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
iPhone game development help?? 1 Answer
Error BCE0044 0 Answers
Android build not working (Screen freezing every frame) 0 Answers