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 Iratorum · Nov 02, 2014 at 08:09 PM · issuepause

Pause button issue

My issue I don't believe is directly linked to my code, when I press Play to test what I'm doing so far there is no issue, however a new issue has arised where when I use my button input to jump (space) it now pauses the game, it's never done this before and I don't believe I've done anything to cause this, I've also tried changing the input button to see if this makes a difference (Which it didn't), if anybody can help me out that will be most appreciated.

Thanks

Comment
Add comment · Show 5
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 AlwaysSunny · Nov 02, 2014 at 07:09 PM 0
Share

When this happens, does the pause button in the editor activate as if you clicked it, or does the game simply hang? If it's the latter, something hooked to your spacebar likely has an error which halts execution. Show us any code linked to your spacebar.

avatar image Iratorum · Nov 02, 2014 at 07:31 PM 0
Share
 void Jump() {
         if(Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.Space))
         {
             audio.PlayOneShot(JumpSound);
             rigidbody2D.AddForce(new Vector2(0, jumpSpeed));
             anim.Play("Jumping");
         }

The game pauses and if I click the pause button again it continues

avatar image AlwaysSunny · Nov 02, 2014 at 07:42 PM 0
Share

Do you receive an error or warning in the console when this function executes? Do all three lines in the if-statement execute as expected? (apart from pausing the game, of course)

avatar image Iratorum · Nov 02, 2014 at 07:57 PM 0
Share

Nope no warnings or error messages, everything works fine, and I only just added the audio part but this problem was occurring before I put that in anyway, I think it's to do with a similar problem when in games, if you don't have the game "selected" as it were and say were to press W to walk and then Enter to do an action, if the Desktop was selected ins$$anonymous$$d of the game you would open up a program beginning with W, if you understand what I mean?

avatar image AlwaysSunny · Nov 02, 2014 at 08:09 PM 0
Share

Well, the spacebar shouldn't pause the game, even when the editor is selected. The game or editor losing focus does pause the game, but that's unrelated to the spacebar. Posting your question, hope someone can help.

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by jrpaoliello · Mar 02, 2016 at 06:44 AM

Hello, I solved that. In the button pause properties (Inspector), the property Navigation need to be "none".

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 EvanCheddar · Mar 22, 2018 at 08:17 PM 0
Share

nice call man

avatar image Semmelklees · Jun 09, 2020 at 08:56 PM 0
Share

I have the same issue, but here is the thing: what the hell are pause properties and where do I find them? If I go to my object that I want to add a jump, I have on my inspector "Transform", "$$anonymous$$esh filter", "$$anonymous$$esh Renderer", "Box Collider", and the Scipts I added, no word of a "button" called "pause Properties"

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

6 People are following this question.

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

Related Questions

(JS) Touch pause menu issue 1 Answer

How do I make it so when I press a button it only triggers untill i press it again? 1 Answer

Pause Audio Help 1 Answer

How to ignore Submit button when coming out of pause menu? 0 Answers

Timescale wont work 0 Answers


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