Move -> Vector2 ํƒ€์ž…์œผ๋กœ ๋ฐฉํ–ฅํ‚ค arrow 4๊ฐœ ๋“ฑ๋ก ํ–ˆ๋Š”๋ฐ

Shift -> Button ํƒ€์ž…์„ ์ถ”๊ฐ€ํ•ด์„œ


InputAction moveAction = action.Player.Move;

InputActionย buttonAction = action.Player.Shift;

์ด๋ ‡๊ฒŒ ๋“ฑ๋กํ•จ.


Shift ๋Š” Docs ๋ณด๋‹ˆ๊นŒ buttonAction.triggered ๋งŒ ํ•ด์„œ

๋ˆŒ๋ ธ๋Š”์ง€ ๋ฐ”๋กœ ์ฒดํฌ ๊ฐ€๋Šฅํ•œ๋ฐ

moveAction์€ readValue๋กœ Vector2๊ฐœ ๊ฐ’์„ ํ†ตํ•ด์„œ๋งŒ ํ™•์ธ ๊ฐ€๋Šฅํ•œ๊ฑฐ์•ผ? triggered๊ฐ€ ์•ˆ๋จนํžˆ๋Š”๊ฑฐ ๊ฐ™๋”๋ผ๊ตฌ.


์ด๋Ÿด๋•Œ๋Š” Shift -> Button ์ชฝ์— ๋˜‘๊ฐ™์ด ๋ฐฉํ–ฅํ‚ค 4๊ฐœ๋งŒ ๋“ฑ๋กํ•ด๋†“๊ณ  Triggered๋กœ ์ฒดํฌํ•˜๋Š”๊ฒŒ ์ข‹์„๊นŒ?

Vector2 ๊ฐ’ ํŒ๋‹จํ•ด์„œ ๋ˆŒ๋ ธ๋Š”์ง€ ํ™•์ธํ•˜๋Š”๊ฑด ๋จผ๊ฐ€ ๋„ˆ๋ฌด ์กฑ๊ฐ™์•„์„œ.