Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to use the WYSWYG editor properly?

Discussion in 'Editor & General Support' started by paala, Apr 25, 2014.

  1. paala

    paala

    Joined:
    Mar 24, 2014
    Posts:
    20
    Hello,

    I have the following issue: if I drop a image into the scene and build for web the image looks good, but if I build for mobile it doesn't display properly.

    If i use the code, the image is display good for all devices:
    Code (csharp):
    1. GUI.DrawTexture(new Rect(0,0, Screen.width,Screen.height),backgroundtexture);
    I want to be able to have buttons and drag and drop their position into the scene and those to be displayed in the position I meant for them to be on all devices.

    Now to create a button I use:

    Code (csharp):
    1. if (GUI.Button(new Rect(Screen.width*.5f-100, Screen.height* 0.5f, 317, 102), "",texturabuton))
    2.         {
    3.             print("no autocomple");
    4.             Application.LoadLevel("EndOfPart4-Lesson2D");
    5.         }
    But this is controlled by code and I can't see where the actual button is only after I press play.

    Thanks for helping me, I am an unity beginner.