asked
[MMORPG Game Development Series with C# and Unity] Part3: Unity Engine
Input Manager
Written on
·
189
0
InputManager의 OnUpdate함수에
if( KeyAction != null) 일때만
KeyAction.Invoke(); 를 해줬는데
KeyAction이 null일때 Invoke를 해주면 문제가 생겨서
저렇게 조건을 넣어주신건가요????
Answer 1
KeyAction에 아무것도 += 해주지 않으면 null인 상태가 되며 크래시가 납니다.