unity3d – How to use Unity’s new InputSystem’s “Player Input” with a player prefab?

A bit of an unwieldy title, but I tried to be specific 😅

I’m testing out Unity’s new InputSystem… system, and came across this conundrum:

For consistency’s sake, I keep my Player as a Prefab, which of course includes the “Player Input” component that comes with InputSystem.

I wanted to wire Player Input’s “Invoke Events”… events to the relevant functions in the Prefab, but a quick skim online shows that’ll lead to trouble down the road, as you’d be using the function of the Prefab instead of the Instance.

However, hooking up “Player Input” to “MyBehaviour.cs” doesn’t show me any appropriate functions in the dropdown – just “string name”…


Read more here: Source link