MCQs > IT & Programming > Unity3D > Using the following code you can Change navigation keys for UI at runtime?

Unity3D MCQs

Using the following code you can Change navigation keys for UI at runtime?

Answer

Correct Answer: void Update() { timer -= Time.deltaTime; if(timer > .0f) return; AxisEventData ad = new AxisEventData(EventSystem.current); if(Controls.Up()) ad.moveDir = MoveDirection.Up; else if(Controls.Down()) ad.moveDir = MoveDirection.Down; else if(Controls.Left()) ad.moveDir = MoveDirection.Left; else if(Controls.Right()) ad.moveDir = MoveDirection.Right; else return; ExecuteEvents.Execute(EventSystem.current.currentSelectedGameObject, ad, ExecuteEvents.moveHandler); timer = cooldown; }

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