(); } if (inputField==null) {Globals.lockmouse = !Globals.lockmouse;} } }, 2.public interface IBlah { UnityEvent thisEventHasToBeImplemented { get; } } public class Blah : IBlah { UnityEvent _event = new UnityEvent(); UnityEvent thisEventHasToBeImplemented { get { return _event; } } }, 3.Both, 4.None of the above">
MCQs > IT & Programming > Unity3D > Using the following code, How to disable keyboard input when user is typing?

Unity3D MCQs

Using the following code, How to disable keyboard input when user is typing?

Answer

Correct Answer: void Update () { if ((Input.GetButtonUp("M"))){ GameObject go = EventSystem.current.currentSelectedGameObject; InputField inputField = null; //creating dummy, null, InputField component if (go!= null) { inputField = go.GetComponent(); } if (inputField==null) {Globals.lockmouse = !Globals.lockmouse;} } }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Unity3D Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Unity3D Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it