• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by NoviceGameDev · Sep 30, 2012 at 03:41 PM · guiscenesizemain menu

Changing start scene gui size main menu

I did some searching but couldn't find answer to this basic question.

I have done this code in a script:

 using UnityEngine;
 using System.Collections;
 
 public class Menu : MonoBehaviour {
     
     void OnGUI () {
         if (GUI.Button (new Rect (25, 25, 100, 30), "Button")) {
             // This code is executed when the Button is clicked
         }
     }
 }


Then I created an empty game object and put the script in it. When I press play then I can see the button in the corner.

But How can I change the size of the window? This is supposed to be the window that comes when they start the game... With buttons such as "play" "options" "load" etc.

It would be much easier if I could see the actual window that I have created with unity. With the border and x button in corner etc.

Hope you understand my basic question!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Sep 30, 2012 at 03:40 PM 0
Share

http://docs.unity3d.com/Documentation/Components/gui-Basics.html

http://docs.unity3d.com/Documentation/Components/GUIScriptingGuide.html

http://docs.unity3d.com/Documentation/Components/gui-Controls.html

http://docs.unity3d.com/Documentation/ScriptReference/GUI.html

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Does removing scenes from build settings reduce the file size of a game? 2 Answers

GUI texture size doesn't match control set with the same size 1 Answer

Application.LoadLevel() doesn't clear screen 1 Answer

how big is my app size 2 Answers

Skinned/unskinned GUI controls size differences 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges