I’ve started implementing ads into my mobile game and right after following the initialization instructions, I’m getting this error:
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.
I only use the new Input System in my game. Is it safe to ignore this error message or is there a way I can remedy it? When I disable the the ads initialization script, the error message disappears. So I’ve concluded that this is caused by the Ads code.
@ejoflo
From my testing, it looks like the errors are coming from the UGUI package and they are because of the legacy Input Module on the EventSystem.
The Ads package uses the UGUI system for the test ads shown in the Editor. If no EventSystem is in the scene, then it will add a new one, but it will have the old Input Module on it, which throws the error.
The workaround would be to make sure there is already an event system in the scene and make sure to upgrade the Input Module to the new Input System UI Input Module (There is a button on the old module to automatically convert it). That worked for me in my tests to resolve the errors.