Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by brain56 · May 29, 2012 at 06:32 AM · inputdisable

Disable ALL user input

Hi! I was wondering if it's possible to disable ALL (as in ALL) user input (keyboard, mouse, etc.) and then re-enable them all again.

What I'm trying to do:

I have an opening cutscene that's playing realtime and I want to disable interaction with the game while the cutscene is live. I've tried just setting GameObject.active = false; but this makes the objects invisible.

Thanks! :D

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 brain56 · May 29, 2012 at 05:44 AM 0
Share

By the way, I've searched on this question but didn't find anything. So if it's there elsewhere, sorry, I fail at searching. Please be a lamb and kindly point me there. :P

avatar image hijinxbassist · May 29, 2012 at 06:36 AM 0
Share

Are you trying to disable things called in OnGUI.. or GUIText/GUITexture? Not sure what these "Objects" are that you are referring to.

avatar image flamy · May 29, 2012 at 06:41 AM 0
Share

have a boolean that turns true, when it is true, discard all input processing

avatar image brain56 · May 29, 2012 at 06:59 AM 0
Share

@hijinxbassist I'm trying to disable clicks to a Toolkit 2D tk2dButton.

avatar image hijinxbassist · May 29, 2012 at 08:10 AM 0
Share

@brain56 Yeah, deactivating the object/script would get rid of all the rendering. Im not sure how they handle clicks, you will have to modify the code, contact the devs, or hang out here til someone who has the kit answers. Id suggest modifying you question to include that you are using that kit, otherwise other users think you are using your own Unity code.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by tomka · May 29, 2012 at 06:34 AM

Create a wrapper around the Input class, and then call your input class rather than UnityEngine.Input. That way you can create a flag that will make your input class act as though no input has occurred.

Comment
Add comment · Show 1 · 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 BenLeggiero · May 03, 2014 at 06:12 AM 1
Share

Care to provide an example?

avatar image
0

Answer by ABD_ALRAHMAN_SAMMANI · Jul 25, 2016 at 04:15 PM

disable the script that make the player move public void Toogle_Input(bool IsAlive) { _user_Input.enabled = IsAlive; }

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

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

9 People are following this question.

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

Related Questions

Re-disable mouse input after scene change? 2 Answers

Can`t regulary send bool value from one script to another after disabling gameobject and enabling again 1 Answer

Animation End as a trigger and how to disable input 1 Answer

This should be simple : Input Button Question 1 Answer

NGUI typing into UI makes my character jump!! 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