Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by Rayleigh2116 · Mar 09, 2014 at 02:16 PM · pausepause menupause game

How to make a pause menu with Gui Texture??

Hi Can someone say me How to make a pause menu with Gui Texture?? Sry i have no idea why to make it?? Not a gui button only a gui texture when i press my pause button than the gui texture come and when i not press my pause button the gui texture is visible.

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by fafase · Mar 09, 2014 at 05:22 PM

You can enable/disable GUITexture so that they show/disappear when the pause is activated.

You could use an event to which a method subscribe and set all the GUITexture for the pause and inverse.

Or you use GetComponent.

Then you can use:

 if(guiTexture.enabled == true && Input.GetMouseButtonDown(0) && 
     guiTexture.HitTest(Input.mousePosition))
 {
      // Action
 }

This above is same as

 if(GUI.Button(rect, text)){}

but it would run in some Update.

Comment
Add comment · Show 2 · Share
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 Rayleigh2116 · Mar 09, 2014 at 09:04 PM 0
Share

But when i use like this one and push my pause button nothing happend and when i resume the gui come ??

avatar image fafase · Mar 10, 2014 at 05:58 AM 0
Share
 if(guiPause.enabled == true && Input.Get$$anonymous$$ouseButtonDown(0) && 
     guiPause.HitTest(Input.mousePosition))
 {
      guiPause$$anonymous$$enu.enabled = true;
      guiPause.enabled = false;
 }
avatar image
0

Answer by haim96 · Mar 09, 2014 at 02:16 PM

check if this helpful in some way for you:

https://www.assetstore.unity3d.com/#/content/1020

Comment
Add comment · Show 3 · Share
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 Rayleigh2116 · Mar 09, 2014 at 03:56 PM 0
Share

Thx but this is not using gui texture i want my button are locks better not the normal gui button. And when i used this https://www.assetstore.unity3d.com/#/content/1020 and add this my game and start this in my galaxy s3 i dont see the pause menu?? Only when i played with pc or use remote with my galaxy s3.

avatar image haim96 · Mar 09, 2014 at 05:13 PM 0
Share

converted you answer to comment. any way, you have a problem with the look of the menu?

here a reference to how to use gui texture: http://docs.unity3d.com/Documentation/Components/class-GuiTexture.html

and the scripting part: http://docs.unity3d.com/Documentation/ScriptReference/GUITexture.html

avatar image haim96 · Mar 09, 2014 at 05:14 PM 0
Share

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

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.

Follow this Question

Answers Answers and Comments

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Pause Game Through Button UI Click Instead of Escape Key? 2 Answers

Game stays paused after Restart. 1 Answer

how to pause the mouselook script during pause? 1 Answer

Make button be above another button? 1 Answer

need help with locking the camera in Pause Menu 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges