Hey ,
I seem to have a problem with reading the inputs in NewInput System. I have set up an ActionMap.
and wrote this code to be able to read this input. My problem is, i want to read the same input from another script as well. I have done everything the same in the other script. but the inputs will not be registered there.
Controls control;
void Awake(){
control = new Controls();
controls.Player.Turn.canceled += ctx => moveNew = Vector2.zero;
controls.Player.Turn.performed += ctx => moveNew = ctx.ReadValue<Vector2>();
}
So i copy pasted this section to another script. But i couldnt read the inputs. However and this is really interesting for me, because i am allowing both input systems in the project i tried to read the inputs through GetAxis method (old version) and this time the new Input System couldnt register anything at all. This is something extra but i would appreciate a bit of insight to this topic . I hoped that i made my problem clear.
I know i could hold a reference to the previous scipt and read the input from a property of that script. Actually i ve been doing that so far. But still i want to learn if there is a way to read the same input from different locations.