I'm making a game with Unity.
Move the characters on the screen with the alphabet key buttons,
I want to select a menu button with the arrow keys.
Currently in the script attached to the character
By the Input.GetKey method in Update,
I succeeded in moving the character.
However, at the same time as moving the character with the alphabet key,
Also select the menu button beside
For some reason, I am troubled because the same button will move without permission.
I would like to have different buttons work separately.Applicable source code
The script given to the character is
transform.Translate(0, 4.5f * Time.deltaTime, 0);
transform.Translate(0, -4.5f * Time.deltaTime, 0);
Is like thatWhat I tried
If i deactivate a button, it won't be selectable
You cannot do what I want with that method.
(I want to select menus and commands while moving characters)
I'm in trouble because it doesn't come out even after checking.
It may be difficult to convey, but thank you.
Answer # 1
Present in Unity Button component settings
NavigationThe property is probably
AutomaticIt seems that it has become so
I think this will remove the focus shift in WASD
- c # - the player character of unity rotates
- how to specify a character string containing "/" in c# enum (enumeration type)
- ruby - the character code of the character string entered at the command prompt cannot be converted
- c# - unable to read the array of json objects in unity
- c# - change ui when ch5 arrow of unity textbook 2019 hits
- i want to execute the command of the command prompt in c# (create printer port)
- c# - [unity] i want to make a navmesh target a clone generated from a prefab
- c# - unity: about 3d models does it work faster with fewer faces?
- c# - unity: how do i get the "object in the scene" class?
- c# - unity beginner: item field implementation of escape game, even if you take an item, it is not reflected in the item field
- c# - navigation setting of button does not work well in unity ui
- c# - i want to overwrite the value of the json file itself in unity
- c# - unity block breaker the ball doesn't bounce back
- c# - [unity] why build slows down
- c# - i want to get hwnd using systemdiagnosticsprocess in unity
- c# - regarding compiler options of unity
- c# - i don't know unity [how to change object position according to story like rpg game]
- c# - i want the camera to follow the operating character vertically and horizontally
- c# - in unity, i want to instantiate the specified prefab as a child of the specified object