Forum rules - please read before posting.

Warnings when porting 2D Demo to Unitys new Input System

I'm trying to port the 2d demo into using Unity's new Input System. It seems to be working but I keep gettngs these two warnings:

Input Action 'ToggleCursor' not found

-> AC debug logger
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
AC.ACDebug:LogWarning (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:33)
AC.ControlsReader:GetInputAction (string) (at Assets/AdventureCreator/Downloads/Input System integration/Scripts/ControlsReader.cs:284)
AC.ControlsReader:Custom_GetButtonDown (string) (at Assets/AdventureCreator/Downloads/Input System integration/Scripts/ControlsReader.cs:178)
AC.PlayerInput:InputGetButtonDown (string,bool) (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:1869)
AC.PlayerInput:UpdateInput () (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:239)
AC.StateHandler:Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:159)

Input Action 'Jump' not found

-> AC debug logger
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
AC.ACDebug:LogWarning (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:33)
AC.ControlsReader:GetInputAction (string) (at Assets/AdventureCreator/Downloads/Input System integration/Scripts/ControlsReader.cs:284)
AC.ControlsReader:Custom_GetButtonDown (string) (at Assets/AdventureCreator/Downloads/Input System integration/Scripts/ControlsReader.cs:178)
AC.PlayerInput:InputGetButtonDown (string,bool) (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:1869)
AC.Player:_Update () (at Assets/AdventureCreator/Scripts/Character/Player.cs:131)
AC.StateHandler:Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:275)

Here's what I done so far (hopefully this might help someone in the future):
1. Installed the "Input System" Unity package
2. Installed the Input System AC integration package over at https://adventurecreator.org/downloads
3. Set Project Settings->Player->Configuration->Active Input Handling->Input System Package (New)
4. Added an instance of the ControlsReader prefab to the scene
5. Added a global AC variable for "Global String Variable"
5. Added an input called Jump as such:
https://1drv.ms/u/s!Amz_vh8OYDX3vtxc9mfUeOZVHBbu0w?e=hnGuwr

One would think the Jump warning would be gone after the last step, no? 🤔

Here's what my ControlsReader component looks like:
https://1drv.ms/u/s!Amz_vh8OYDX3vtxc9mfUeOZVHBbu0w?e=hnGuwr

AC: 1.76.3
Unity: 2022.2.7

Thanks!

Comments

  • Both links point to the same screenshots - did you post the wrong link to ControlsReader?

    Be sure to save the asset after adding the new Jump input.

  • edited March 2023

    Huh, that is SO strange. I had to close Unity in order for the cahanges to the asset to be persisted. Ctrl + S did nothing... When I opened up Unity again, the runtime suddenly understood they were defined! Probably a bug in Unity 2022.2 🤔

    But hey - awesome that you have a solution in place for switching to the new input system, is that package a new addition? 👏
    Maybe AC should even be using Input System by default (if it's supported on all your supported Unity versions) 👍

  • edited March 2023

    Regarding controller support for navigating dialogues, I got the left/right stick working, but I don't understand how to wire up the d-pad support for Horizontal and Vertical using the Input System...

    Come to think of it, there were no warning about the Horizontal and Vertical input not being registered - is there something extra that AC needs in order to listen for them?

  • edited March 2023

    I created a repro for the issue:
    https://1drv.ms/u/s!Amz_vh8OYDX3vt11o1_qd7KS_AYJgQ?e=1MyZsQ

    1. Open up the 2D demo
    2. Using a controller - enter the pause menu
    3. Notice how left and right stick works for navigating the menu, but not the d-pad

    Thanks!

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.