Forum rules - please read before posting.

Input Template Confusion

What is the procedure for adding and removing inputs for the input system template? I removed some Actions from the Controls asset in my project settings, and added new ones that I'm using. However, now one of the slots on the AC input-rebinding menu just reads "input" and I get these errors:

NullReferenceException: Object reference not set to an instance of an object
AC.Templates.InputSystemIntegration.RemappableAction.AssignOverride (UnityEngine.InputSystem.InputActionAsset asset) (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Templates/InputSystem/Scripts/RemappableAction.cs:63)
AC.Templates.InputSystemIntegration.InputRemapper.OnEnable () (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Templates/InputSystem/Scripts/InputRemapper.cs:45)
UnityEngine.Object:Instantiate(Canvas)
AC.Menu:LocateLocalCanvas() (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:3314)
AC.Menu:LoadUnityUI(Boolean) (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:402)
AC.Menu:TurnOn(Boolean) (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1982)
AC.PlayerMenus:CheckCrossfade(Menu) (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2357)
AC.Menu:EndTransitionOff() (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1833)
AC.Menu:HandleTransition() (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:2312)
AC.PlayerMenus:UpdateMenu(Menu, Int32, Boolean, Boolean) (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1086)
AC.PlayerMenus:UpdateAllMenus() (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2257)
AC.StateHandler:Update() (at C:/Users/Me/Desktop/test/Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:274)

Comments

  • edited March 1

    Also, I have made sure the project's active input handling is set to use only the new input system. I have not yet added CursorHorizontal (or vertical) input, yet it already works when testing out the first person camera? Is it because it is already configured in the UI Action Map (rather than Player)?

  • However, now one of the slots on the AC input-rebinding menu just reads "input" and I get these errors

    If you removed an Action referenced by the Menu's Input Remapper component, then you'll need to remove its entry there. I'll see if it can just ignore empty fields, however.

    Is it because it is already configured in the UI Action Map (rather than Player)?

    Yes - the Maps are just there to help categories Actions. The ControlsReader only searches for Actions by Action name.

  • edited March 4

    Understood. So how do we assign inputs so they appear in the Rebindings menu? I made some new active inputs but they don't appear as options to rebind, I'm assuming there is some extra step that I've missed. Do we just drag and drop from the Controls Asset to the InputsUI prefab fields?

    Unrelated: I was having issues with the third person camera jittering, but solved it by giving the GameCameraThirdPerson script a negative value in the script execution order. You might want to make this the default when importing AC (unless it screws something else up that I don't yet know about).

  • So how do we assign inputs so they appear in the Rebindings menu?

    The menu's Canvas prefab, InputsUI, has the Input Remapper component on its root. For each remap, you need to supply the action, a UI Button, and the binding index.

    I was having issues with the third person camera jittering, but solved it by giving the GameCameraThirdPerson script a negative value in the script execution order.

    Thanks for the details, but I'd need to be able to experience the issue on my end before I could make such a change. Was this in addition to tweaking the provided "Update method" field in its Inspector?

  • Thanks for the details, but I'd need to be able to experience the issue on my end before I could make such a change. Was this in addition to tweaking the provided "Update method" field in its Inspector?

    Yes, I tried Update and Late Update with the same result, most noticeable when the character is running with root motion animation (via direct control). That said, I realised I have Final IK on my character, so that's highly likely to have played a part.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.