Forum rules - please read before posting.

'InvalidOperationException' problem

My deepest apologies for asking for help so early in to my venture with Adventure Creator - but I've hit the same problem twice at the same point when following a tutorial. I think it may be to do with the UI choice I made when setting up my game - opting for AC rather than Unity's. The difficulty I'm having is the difference between AC's current menu compared with outdated tutorials.

The error code I'm getting is:

InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
UnityEngine.Input.get_mousePosition () (at :0)
AC.PlayerInput.InputMousePosition (System.Boolean _cursorIsLocked) (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:1729)
AC.PlayerInput.UpdateInput () (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:312)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:188)

I'm suspecting this is an easy fix, and probably a face-palm moment. But I'd be very grateful for any help! :)

Comments

  • Welcome to the community, @STEVONATRON.

    No apologies necessary - thanks for reaching out, this is a common trip up with Unity newcomers.

    This occurrs when there is a difference between your project's way of defining input, and AC's way of reading input.

    If you go to your Project -> Player settings, you'll find an Active Input Handling property. If this is set to Input System (New), then you'll need to ensure that AC has the "Input System integration" template installed so that it can read input in the correct way.

    You can install this template into an existing AC game by running the New Game Wizard and choosing the Modify existing option.

    Alternatively, you can set this property to either Input Manager or Both to have your game's Inputs be defined through the Input Manager tab of the Project window. Though, this mode is being phased out by Unity and is moving focus onto the newer Input System mode, which is now the default with new projects.

  • Thank you Chris - this worked perfectly! Much appreciated :smile:

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.