#🖱️┃input-system

1 messages · Page 1 of 1 (latest)

dusty perch
#

@dawn sapphire I have same problem as you, but my input settings looks fine, what you had wrong there?

austere grotto
#

presumably you have code doing that

fallen minnow
dawn sapphire
dawn sapphire
dusty perch
#

my component looks correct so probably have some other issue 😦 thank you for the response!

austere grotto
ocean sedge
#

is there a way to use left control + some key as a bind on itch without activating other control commands(like closing the window or highlighting everything)?

fallen minnow
#

the mouse isnt exactly on the right position but i think u can get the idea

austere grotto
#

etc

#

make sure they're not referring to each other's

strange lichen
#

I have an HID device that I added a custom input class for the input system. I'm running into an issue only in build mode strangely where the input action for the button is triggering as performed when I plug in the device and cancelled when I unplug it. Also, sometimes when I start the application it triggers performed even though I didn't press anything. Not sure what's going on here

#

Actually it is happening it editor too

#

To be clear the button is not pressed and Initial State Check is disabled

#

I think I know what's causing it, it seems to receive an HID value when connected that's different from button press. The bit it uses for the button is also included in the connected value bits.

#

I'm unsure how to just read the button presses but and not have it read it when it is set for the connected value

fallen minnow
fallen minnow
strange lichen
#

I basically need a way to tell the input system to only use the specific bit when the remaining bits in the byte are all zeros. Is this even possible?

austere grotto
#

I don't know how to hook custom devices/device handling into the input system though

strange lichen
#

I think I solved it using a custom processor. Instead of using the type "BIT", I'm using the type "BYTE". With the custom processor I check the float representation to see if it is equal to 0.003921569 (00000001 in binary) and if it is I set the value to 1 otherwise I set it to 0. There has to be a better way I just can't find it right now, but this is working.

austere grotto
strange lichen
austere grotto
#

Can you get the value as an int instead of a float/

strange lichen
#

I don't think so, I can try real quick though. I think button controls force float

austere grotto
#

it might cast it and round down to 0

#

I think you can just interpret as int in unsafe code but if what you have is working consistently I guess don't worry about it 😛

tame oracle
#

how do i turn of keyboard and mouse in the new input system to just test out my gamepad and touch with mouse on the computer?

#

this doesnt fix it, its doesnt mean i only get gampad

tame oracle
#

how do i disable keyboard and mouse in new input system?

paper acorn
#

How do I get the key name of a mapped binding but considering the keyboard layout? So if movement is wasd and the player uses azerty, I need to return zqsd. I really can't figure it out

cinder slate
#

i'm trying to figure out the input system and i have the following questions:
Am I able to add custom events that aren't coupled to keypresses or mouse clicks. ie could I programatically call it from script1 and recieve the event on script2 and use it like a custom event system?

How would I work with multiple keys like ctrl + P without triggering each, do i just use dumb filtering logic to check if both are pressed?

austere grotto
last epoch
#

well im assuming that you have just InputSystem.Switch when you should have UnityEngine.InputSystem.Switch

vocal jay
#

The API is unavailable on Linux, I'm just confused why

last epoch
#

ohh alright

vocal jay
#

Since the controller itself is supported

#

Maybe driver stuff, no idea

last epoch
#

what kinda game are you making

#

or some sort of cheat

#

and for what device

umbral furnace
#

Hey all, anyone know the equivalent to Input.getmouseposition using the new input system?

#

I'm watching this vid that uses Input.getmouseposition and my project is using the new input system, jsut need to know how to get the mouse position in pixel coordinates

tame oracle
umbral furnace
#

I got the typical using old input system message

#

And it was only after adding the code that used the old input system syntax

tame oracle
#

So everything works fine?

umbral furnace
#

No I'm getting an error

crisp gyro
#

the first result yielded Mouse.current.position

umbral furnace
#

....

#

Is that not the viewport position

#

As in (0,0), to (1,1) not (0,0) to (screen.xpixels, screen.ypixels)

#

Also

crisp gyro
#

a workaround is to multiply it by the current resolution

umbral furnace
#

have you tried not being a jerk?

crisp gyro
#

it was a genuine question

#

there are a lot of people here who will not google a question first

tame oracle
#

What happened here that fast lol

umbral furnace
#

Assuming that I wouldn't google something before coming to a Discord server for my problem

crisp gyro
#

so would multiplying the x and y components by Screen.width and Screen.height and rounding the answer work?

umbral furnace
#

Perhaps?

crisp gyro
#

the docs entry for Input.mouseposition states:

The bottom-left of the screen or window is at (0, 0). The top-right of the screen or window is at (Screen.width, Screen.height)
#

so it should work

#

don't take what I said personally. sorry if it came off condescending

#

I need to sleep

umbral furnace
#

I mean the three question marks kinda made it sound a sort of way lol

#

Its all good tho no hard feelings

spark flume
#

Hi guys, anyone else had a problem with the new input system? > I've remade the input with the new system. Works fine in the editor but it doesnt on the build ...
Any ideas? Thanks !!

stark cipher
#

What are the advantages of using the new input system over the old one?

spark flume
#

my proble is that doesnt work on the build for some reason

spiral galleon
austere grotto
#

you can't.

#

just apply your own modifier in code

#

Or use the new input system if you want full control over your input system

storm marlin
#

How do people setup the new input for UI generally? If I instantiate the actions in another script, which I think is generally what you want to do since it doesn't make sense for the UI to own that, the UI system instantiates its own actions, which doesn't play nice with the first one. Do people use 2 sets, one for UI & another one for the rest of the game?

#

The event system which the UI relies on also seems to be closely tied to the UI overall & seems to be used as a singleton for the tutorials I've seen. But that seems to for example preclude the use of multiple menus being open at the same time. Imagine a split screen game where each player has its own menus which they control.

austere grotto
#

Also for split screen by far the simplest way is to use PlayerInputManager and PlayerInput as it handles device/player mapping/management

storm marlin
#

Ok, cool I'll take a look at that

soft basin
#

Anyone happens to know why my character keeps moving the same direction when I try apply a sideways direction? E.G I hold w, but the character keeps moving up even when I press d and release w

austere grotto
soft basin
#
void Awake() 
{
    input = new ();

    input.Game.Movement.performed += Move;
    input.Game.Movement.canceled += StopMove;
}
void Move(Context context)
{
  velocity = context.ReadValue<Vector2>();
}

void StopMove(Context context)
{
  velocity = Vector2.zero;
}  

void Update()
{
  var speedVector = velocity * speed;
  rigidBody.velocity = speedVector;
}
soft basin
austere grotto
#

show your input action configuration?

soft basin
#

In the inspector?

austere grotto
#

the input action configuration

#

for the Movement action

#

in your input actions asset

soft basin
#

Is this enough

austere grotto
soft basin
#

Thanks that did it

#

I didn't notice I added it amel_sorry

austere grotto
#

you can remove that component entirely

#

it's doing nothing for you

soft basin
#

Thanks

urban tide
#

Hi, how do I use the new unity input system to make a camera look script for mobile?

thorny frigate
#

I am currently working on a turn-based tactic. In a turn, your pick your option, like choosing an ability, and then the options menu closes you can click on a square on the ground to use your ability on. The problem I am facing is that when I press submit, the button onclick registers, and changes the game state to choosing the square the ground to use your ability on. A problem that might occur is that if I hold down the submit button, and let go after the game state changes, I would accidentally pick a square because I am currently using WasReleasedThisFrame().

#

I have considered changing to WasPressedThisFrame, but I was wondering if was any way to cancel the WasReleasedThisFrame if a button on click has registered the input

storm marlin
#

How do I control flow in UI depending on 'Cancel' button in the input system?

#

Buttons has a Clicked which can be hooked up, but nothing for Cancel it seems

#

NVM found it

verbal star
#

is there a way to prevent mouse clicks from triggering the player input when a UI event is triggered

storm marlin
#

So we run the game logic in FixedUpdate. Therefor we set the input to fixed update as well as otherwise you can get pressed -> released and miss it. The problem however is that setting the timeScale to 0 for pause also stops updating the input system. Am I missing something?

verbal star
#

update what in input system ?

#

input system is unaffected by time scale

#

unless you're using it inside an Update

storm marlin
#

Not if you have it in fixed update

verbal star
#

i never really changed those

storm marlin
#

Yeah if you do your game logic in Update() you're probably fine, but that has issues with the physics side of things

#

For example if you use delta time for deciding movement on a kinematic actor, the movement won't happen until a fixed time step is taken

#

So for example if you have 3 Updates() per FixedUpdate() things will move 1/3 the expected distance

verbal star
#

yeah

#

but why is input update mode set to fixed...

storm marlin
#

Imagine FixedUpdate() -> user pushes down button -> Update() -> user releases button -> Update() -> FixedUpdate()

verbal star
#

oh i see

storm marlin
#

So if you use the WasPressedLastFrame or whatever it's called for example will say false

#

Even if the button was down

#

WasPressedThisFrame I mean

verbal star
#

you could just pause the game the tedious way then

storm marlin
#

Yeah I think we'll have to smack in a base class which overrides & hides FixedUpdate to protect against pause everywhere

#

But it's kind of cumbersome

deep grove
#

Hello, how do i do held button => do something with just the InputAction? I'm aware that i can use its raw value but i'd think it can do that. Like if i press and hold a button, the performed event would just start firing until i release the button. Edit: I'm talking about the new input system.

verbal star
#

you can just check when the button is pressed and released

#

that's its behavior by default

#

bool pressed = context.ReadValueAsButton()

#

assigned this to a class variable

#

it'll stay true while the button is pressed

deep grove
#

Single and Hybrid are handled by the event alone, so it feel weird.

#

But if it's not possible then i guess there's no other way.

verbal star
#

i never used that behavior

#

i usually just go with invoke unity events

verbal star
deep grove
verbal star
#

you can still keep experimenting though, there could be one

verbal star
#

it looks like setting ui action types to button and value instead of "pass through" isn't helping either

deep grove
# verbal star any idea about this

Maybe you can have a GameManager which will tell the Player script to stop it's logic. (I'm assuming a UI event as in a UI is setActive?)

verbal star
#

Won't it depend on the execution order then

deep grove
#

There are plenty of GameManager tutorials on Youtube too, really help me out. Maybe you can check those.

verbal star
#

Umm

#

That's a bit confusing

#

I've attached functions to each UI element

#

So they are the ones that trigger click event

#

And input is handled by single script

deep grove
#

You can see here. When My GameManager send event, it will change isPause to true.

#

Or you can unsubscribe input if any.

#

So with isPause being true, my logic no longer run, hence player script won't do anything

verbal star
#

But my inputs aren't handled inside updates

#

They are invoked

#

So it is dependent on execution order

deep grove
#

Well, you can have GameManager tell the input to stop.

verbal star
#

I have a game manager btw

#

I always use one

#

I just call it the global script

#

I would have to switch my input system behavior in order to achieve that

#

Then it does look straightforward

deep grove
#

I switches my input system like 3 times (due to being a beginner, lol). Then i think you can take this to general channel, more people there can help you.

#

This channel get no love, i feel like.

verbal star
#

Yeah it's usually very silent here

#

There is a way to achieve what I want with the present bahavior, so I'll just try that out first

real shell
#

Anyone with an idea why the "new input system" onscreen stick produces jerky movement on device but not in the editor?

verbal star
#

Might have to tweak the settings in input system package asset

real shell
#

could you give an example of what settings might be worth tweaking?

austere grotto
timber robin
#

It's not, unless you ask a question

verbal star
pulsar mural
#

My eyes

#

Is that the new input system

deep grove
terse yew
#

How can I read the input of clicking the scroll wheel down?

brittle depot
#

Hey guys, I want to convert controls for my game from keyboard to be android controls with buttons in a UI panel, how do I link inputActions to these buttons, so for example if I click the jump button in the screen it does the same thing as pressing space and jumps ? (I am using the new input system)

real shell
unique elm
#

Can anyone help me out with receiving Input from a device outside of focus from the application?

#

and then with a steering wheel xD

austere grotto
forest oak
#

i want to be able to move the camera around the player with my mouse. (eg like in 3d person)
i have a camera controller script

austere grotto
forest oak
#

but how do you get the mouse input?

#

i don't get it

unique elm
austere grotto
forest oak
#

i asked this:

move the camera around the player with my mouse
soo...

#

nvmd tho, because i solved it

austere grotto
#

forget the camera

#

those are two separate questions:

  1. how to get mouse input
  2. how to move the camera
#

you should approach problems like this - break it down into small pieces

sturdy thorn
#

is there a better way to detect input within the FixedUpdate() function rather than using an if statement? Im trying to have actions occur continuously while a button is being held

austere grotto
#

unless you have your input system set up to use FixedUpdate (not typical or recommended)

austere grotto
sturdy thorn
austere grotto
sturdy thorn
austere grotto
#

The input system supports both

sturdy thorn
#

ok, im thinking ill use UnityEvents since they're more straightforward

#

thanks

#

seeing as i have all of my functions public anyways

#

wait, there is a problem

#

so most of the functions that i use as actions from the controls are on another gameobject that is dynamically spawned into the game once a level loads, so where i'd go to set the UnityEvents has no access to the gameobject that actually has the functions that the controls would call

#

in other words the script that executes the detected actions is not located in the context of the PlayerInput component

#

hmm, i'd probably have to rethink my entire system i have here

#

perhaps i just change the if statements to switches instead and call it a day

feral cobalt
#

Hi! I made a joystick that outputs a normalized value, in that case the value is the joystickVec variable. In general it works fine but my issue is that the normalized value is really sensitive and sometimes I move the joystick just pixels and it already jumps to 1. Can you see anything that might cause this? I can show other bits of the setup/code but this is basically the main thing

limber axle
#

Anybody know why the "Press Only" would register the input twice? If I use Release or both, it detects it just once like it should. I'm not sure why it does that.

If I press it very quickly, it does it twice, If press and release slowly (Basically hold it down a bit), it'll register only once.

austere grotto
#

It gives you a vector with the same direction and a length of 1

austere grotto
limber axle
# austere grotto What's your goal? Why do you need the press interactipn?

It seems to be the default setting if you configure nothing in it. So I left it like that and I've been testing a few thing since I had my event registering twice every stroke.

Is that suposed to be a normal behavior? it's really just for menu interaction but it doesn't make sense in me head that this would happen twice.

austere grotto
limber axle
#

Yes. Well. I am getting the same result wiht "Nothing" so I assumed it was the same as this

austere grotto
#

It's not but sounds like you're neglecting to read the phase of the callback context

#

The callback context tells you if it's performed, started, or cancelled

limber axle
#

As I understand, I don't have access to the callback when using the message system

austere grotto
#

You'll get performed and started immediately, and canceled upon release

austere grotto
#

So you would read if it's not zero

limber axle
austere grotto
#

Print out the value

#

value.ReadValue<float>() I think?

#

I'm on mobile so going off memory

limber axle
#

ok let me check that

#

Yeah. I see that the Press action actually register 1 for the first input and 0 at the second one. What would that be? On a keyboard, is it just on/off?

#

nothing actually just register 0

#

and it doesn't register twice now. I'm just trying to understand what the behavior is here and how it works so I can use it all properly. Documentation isn't great. but that points me in the right direction at least.

austere grotto
#

for a default button, you'll get started and performed when the button is pressed, and canceled when it's released

exotic hollow
#

Hello Can someone please help me with VS Code, I've been trying to fix this issues for house and I'm about to pull all my hair out.

#

hours*

#

Quick suggestions are not working, and apparently this should be on by default.

austere grotto
#

Not the right channel

feral cobalt
#

Yes I know. What I mean is when moving the joystick the value doesn’t seem to go linear from 0 to 1 rather jumping sometimes. The sensitivity is just really high.

feral cobalt
exotic hollow
limpid sinew
#

Hi guys! Is possibile to connect mobile controller (like iPhone or iPad) for a pc game (without switch to mobile game)? Thanks you 🙏🏼
Would you have some guide?

barren dust
#

I just started working with Unity's free Third Person Controller, and I'm having an issue adding a new action. I read through the document that came with it and followed the steps, but the action I set up is never triggered. If anyone else has gone through this process I could use some help with it.

#

Wait I think I just rubber ducked myself.

barren dust
#

Na, I'm still not registering the new input.

#

I've essentially duplicated the OnSprint and SprintInput in the StarterAssetsInput.cs (but with my own names of course), and then over in ThirdPersonController I created my functionality in a new method and then called it in Update. I don't see anything else missing, but when I press my input button nothing happens. I tried to log out the state of the input and nothing at all logs to the console.

#

Further testing shows that if I manually tick the input value in the inspector, then the action is taken correctly. So, the issue seems to be that the button press isn't being registered.

#

Rider also says that my input method is never being called, whereas the default ones don't show that warning. However, I can't see usages of those symbols anywhere except in the mobile controls, which I am not using.

fierce parrot
#

is there any way

#

unity can take voice input?

timber robin
#

Have you searched the asset store as suggested before?

obsidian pasture
obsidian pasture
#

at first i did get some error about active input something something but it went away for some reason

austere grotto
#

Update doesn't run on deactivated objects/scripts

obsidian pasture
austere grotto
#

so yeah, not an input system issue at all

obsidian pasture
austere grotto
obsidian pasture
austere grotto
#

top to bottom

#

look what it does

#
if i pressed the key this frame
  if menu wasnt active activate it
if i pressed the key this frame
  if menu was active, deactivate it
#

it does ALL of this

#

every frame

obsidian pasture
#

ohhhhhhh

#

Thank you so much, i think i figured it out!

plain echo
#

So I have a problem in regards to input in VR. I have a pointer for each hand and I'm pretty much trying to do a color picker where I pick a color from a Texture2D. For the most part it works great, but the previewing only functions properly for one hand. The other it'll only run the OnPointerEnter event before essentially breaking because it decides it wants to track the location of the other pointer instead.

hard quest
#

New input system user here

#

I'm using Unity's First Person Character Controller starter pack, and I'm trying to add some functionality but it's not doing what I want

#

So, like the Jump input, I have Block and Attack configured as buttons, right?

#

And I've added them to the script that processes the messages the Player Input sends to the GameObject

#

But I only want Block and Attack to register right when the respective buttons (mouse1, mouse2) are pressed -- not pressed and held!

#

so like, the first frame of the input changing state to pressed.

#

Instead, on startup, the game just acts like both buttons are held down (I'm not pressing any mouse buttons here, but I'm spamming projectiles as if I'm holding the mouse down.)

#

What do I do here?

#

I can't even click mouse1 to reset the input

raw trail
#

Hey everyone, I'm fairly new to Unity but I've been working on games of my own after finishing a Udemy, just to learn stuff and rebuild popular games with a twist and challenge myself. I'm in a 2D project with the new Input System and trying to make a top down where the mouse/gamepad stick controls where you look and WASD/the other gamepad stick is for movement, relative to the front facing direction. However, I've been like, all over YT and the internet trying to figure out how to do this moving/looking with the new system and always find stuff different/outdated than mine. Can anyone point me in the right direction (no pun intended), like starting with what to even put under the void OnLook(InputValue value) method? These are the basics that I have so far

onyx vector
#

What’s the main advantage of the new input system compared to the old one?

austere grotto
#

If you're using a PlayerInput component in SendMessages mode, you'll probably want to just store the Vector2 value from the move input in a variable in that method. You can then use it in update to move your character

raw trail
#

yeah. I was looking up some things around YT and reaching documentation and I guess I didn't fully know the extent of the Input System

#

ty btw

#

I'm trying to figure it now, it does kinda get tricky though as everyone's method is different

#

for example, I used a YouTube guide to help me to this point, but any idea how I would implement it so the player moves relative to the mouse?

austere grotto
#

That screenshot is using a completely different approach from what you shared above

#

It's using the generated C# class from the input actions asset.

raw trail
#

yeah. I couldn't find something using the original approach so I switched it

#

tried starting from scratch

austere grotto
#

Both approaches are viable

#

It's really up to you what you prefer

raw trail
#

I'd ideally like to seamlessly switch from mouse/keyboard to gamepad, would either approach be particularly better for that?

#

I know with the first one, the "OnEvent" can cover multiple controls

austere grotto
#

They can both handle that just fine

vale flame
#

Hi, I am having issues with the input system. When I call Mouse.current.WarpCursorPosition() Unity throws a NullReferenceException. Any ideas why ?
P.S: I do have a mouse connected to my computer.
Here is the part that is concerned :

public void OnControlsChanged(PlayerInput input)
{
    string mouseScheme = "Keyboard&Mouse";
    string gamepadScheme = "Gamepad";

    // Check if we are now using the mouse and keyboard
    if (input.currentControlScheme == mouseScheme && previousControlScheme != mouseScheme)
    {
        cursorTransorm.gameObject.SetActive(false);
        Cursor.visible = true;
        // PROBLEM IS HERE VVV
        Mouse.current.WarpCursorPosition(virtualMouse.position.ReadValue());
        // PROBLEM IS HERE ^^^
        previousControlScheme = mouseScheme;
    }
    // Check if we are now using a gamepad
    else if (input.currentControlScheme == gamepadScheme && previousControlScheme != gamepadScheme)
    {
        cursorTransorm.gameObject.SetActive(true);
        Cursor.visible = false;
        InputState.Change(virtualMouse.position, Mouse.current.position.ReadValue());
        AnchorCursor(Mouse.current.position.ReadValue());
        previousControlScheme = gamepadScheme;
    }
}
austere grotto
#

this?
Mouse.current.WarpCursorPosition(virtualMouse.position.ReadValue());?

#

what's virtualMouse ? Seems like that could be null easily

#

Also Mouse.current could be null if your device doesn't have a mouse

jade pilot
#

does anyone know if I can change

        moveAction = new InputAction("Move");
        moveAction.AddBinding("<Keyboard>/w");
        moveAction.AddBinding("<Keyboard>/a");
        moveAction.AddBinding("<Keyboard>/s");
        moveAction.AddBinding("<Keyboard>/d");
        moveAction.Enable();
        moveAction.performed += OnPerformed;

into just one binding?

#

sorry, just started using new input system today

austere grotto
#

I recommend starting with the simpler approaches for now

#

e.g. creating an Input Actions Asset

#

and then using PlayerInput or the generated C# class

jade pilot
austere grotto
#

I'm sure it can

#

you need to make a 2D vector composite

jade pilot
austere grotto
#

I think just that I knew the phrase "composite binding" helped me find that

jade pilot
austere grotto
raw trail
# austere grotto They can both handle that just fine

Okay, cool. Then I'll stick with the code I have atm, the C# generated style. In the screenshot I have, what would I need to make the player move relative to the mouse direction? Like, the way that the mouse is facing will always be forward

jade pilot
austere grotto
#

and disable/enable whole maps at a time

#

so for exmaple you might have an action map for controls for your character on foot. But when they get into a vehicle, there's a separate action map for that

#

and a separate action map for when you're in a UI menu

jade pilot
austere grotto
#

it's for building those menus in game to rebind stuff

jade pilot
#

maybe I'm not understanding it fully, but, CompositeBinding seems almost identical to just binding, however, you can make a new class that inherits from IInputInteraction which although isn't what I was looking for, can add more customization, and then create an action with it doing something like var action = new InputAction(interactions: "MyInteraction(boolParameter=true,intParameter=1,floatParameter=1.2,enumParameter=1);

zenith stone
#

I am making a local multiplayer game and need to connect the correct controller to the correct player when they move from the menu to the main game scene. How do I do this? everything I have tried hasn't worked and I can't find anything on how to do this online.

austere grotto
#

they were designed for this

zenith stone
# austere grotto they were designed for this

I’m using the join manually option on the multiplayer input component because I have all the players join in one scene and then I spawn that amount in the other. I need some way to connect the player to its corresponding controller

austere grotto
zenith stone
#

Does that still happen when you join manually

#

@austere grotto

brazen crypt
#

how would i use the right stick (xInput) in unity? like which axis is based on the right stick?

jade pilot
#

Am I not understanding wildcard fully?

        input = new InputAction("Input");
        input.AddBinding("*");
        input.performed += OnInput;
        input.Enable();
    void OnInput(InputAction.CallbackContext context)
    {
        Debug.Log("True");
    }

Doesn't seem to register back to back mouse clicks unless I type something on the keyboard again first

#

changed the debug to Debug.Log(InputControlPath.ToHumanReadableString(context.control.path)); just to make my life better, which makes me wonder since just realized even moving the mouse triggers this

austere grotto
#

But with so many different types of input events coming in it might be getting pretty confused about its internal state

jade pilot
#

oh okay, I was setting this for now just to understand wildcard better haha, and didn't realize I could be making it worse

jade pilot
#

If I have a movement InputAction, is it better to separate different devices into different Input Actions, for example,

InputAction gamepadMovement = new InputActions("GamepadMovement");
InputAction keyboardMovement = new InputActions("KeyboardMovement");

or just include all the bindings into one InputAction? Or does it not really matter?

jade pilot
#

oh wait, @austere grotto I think I better understand composite binding now? It is better to use this for multiple controls that do the same thing?

jade pilot
#

so I set this up in my action map just get a better idea of checking if a key is held

        upAction.started += (context) => Debug.Log(string.Join("\n", upAction.controls));
        upAction.canceled += (context) => Debug.Log(string.Join("\n", upAction.controls));
        upAction.performed += (context) => Debug.Log(string.Join("\n", upAction.controls));

but reading the documentation some more, I'm kinda confused on .performed now? If .started can be used to check if an input is happening and .canceled to see if the input has ended, what do I do with .performed

#

oh, I guess I need to read more about PassThrough actions since they only use .performed

jade pilot
#

does the Hold;Press interactions natively exist, or do I have create my own class inheriting from IInputInteraction doing what those do?

austere grotto
#

started will happen when it goes from 0 to anything, and canceled when it goes from anything to 0

#

but performed will happen for everything in between

#

started/canceled are sufficient for a traditional "button" control

sleek dock
timber egret
#

does anyone know how to fix this error? here is the code and error

prime moth
#

you forgot to remove this

timber egret
#

thanks i will try it

#

fixed 2 erros your a code saver

#

i think i can handle the rest

#

i have a new error after fixing this one can anybody help?

timber robin
#

You have no action map called FootActions in your PlayerInput asset.

glass yacht
#

You first need to configure your IDE using the instructions in #854851968446365696 so you have proper error highlighting and autocomplete

limpid sinew
#

Hi guys! I should connect the phone to a pc game to use as a controller do you know how i can send two different scenes? that of the game on the pc and the controller on the phone

#

thanks!

sharp geode
floral kettle
#

guys, I'm trying to use Input.mouseScrollDelta, but the value never changes, I'm on macOS

#

works with 2 fingers on touch pad tho, but mouse scrolling is a no go

jagged wyvern
#

Camera.main.ScreenToWorldPoint(MouseInputPos);
isn't changing when I move my mouse

austere grotto
jagged wyvern
jagged wyvern
austere grotto
#

or you'll always jsut get the camera's position

jagged wyvern
#

alright i'll try that

austere grotto
#

Or do what I recommend which is Plane.Raycast

jagged wyvern
#

nice it's working :)

sterile crown
#

I'm having trouble with the input system and visual scripting, the two don't seem to be working together, my graph doesn't recognize my options in the PlayerMovement input script

#

I've regenerated the nodes n everything

#

Is there something I'm doing wrong? Why isnt the graph recognizing the inputs I determined in the input system??

austere grotto
#

from the input actions asset

#

probably kinda fragile through VS because any time you change the input actions asset you need to regenerate the C# script and then regenerate the Bolt nodes

sterile crown
#

Thanks! @austere grotto

#

How do you regenerate the C# script? Is that in Project settings?

austere grotto
#

no it's in the inspector of the input actions asset

sterile crown
#

where is the generated script class too lol

#

Im a newbie

austere grotto
#

wherever you tell it to go in that inspector

sterile crown
#

Would you be free to vc @austere grotto ?

#

rip,

loud hazel
#

Hey, I was just trying to make a game idea I had, and was wondering how i would be able to read and store a string of inputs in the order that they have been input. For example, if the string of input is; "Up, Up, Down", then i want it to be saved like this to be able to be called at a later time
I really worded that terribly my bad
But hopefully it's understandable

noble crag
#

i cant enable anything in the xr plug-in

jade pilot
#

@austere grotto @sharp geode thank you for the responses. Yesterday was super busy so just getting to them today

vivid haven
#

i have a mouse over event on some item slots in an inventory i have been working on, the item names are displayed on a tooltip whichs works almost perfectly

#

but when i deactive the inventory canvas and reactivate it

#

the OnPointerEnter and Exit no longer work

#

so they work the first time but not the second time, i have checked and the issue is that it is simply not being detected

#

wow nvm

#

i manually set the sort order and it started working

jade pilot
#

would InputDevice.deviceID ever not be unique?

#

nvm, just read the tooltip better

#

okay, so, it says the only exception is when a layout is registered that replaces a previous layout, but also says at the end of it that only the devices are recreated and will keep their existing device IDs. So, that is kinda confusing wording

#

in a sense that that isn't really an exception?

open kelp
#

is this like a "Shift W" to run?

#

like if i put shift in the modifier and the w in the binding would that mean they both have to be pressed to work

tawny hearth
#

Okay, so I have a client that asked me to fix his input system one button not working. The thing is, I tested it now with my ps4 controller and it works fine, but I guess he's using some other controller and it isn't. Any ideas what could be going on?

austere grotto
jade pilot
#

is there a way I can add an array of names to an action name?

#

Do I have to do a composite binding, with just different names? For example,

InputAction movementAction.AddCompositeBinding("Movement")
  .With("Move")
  .With("MoveAction")
  .With("Moving");

then do something like

movementAction.AddCompositeBinding("Dpad")
    //all the things;
jade pilot
#

okay read more into custom composites, and think I use

    static CustomComposite()
    {
        // Can give custom name or use default (type name with "Composite" clipped off).
        // Same composite can be registered multiple times with different names to introduce
        // aliases.
        //
        // NOTE: Registering from the static constructor using InitializeOnLoad and
        //       RuntimeInitializeOnLoadMethod is only one way. You can register the
        //       composite from wherever it works best for you. Note, however, that
        //       the registration has to take place before the composite is first used
        //       in a binding. Also, for the composite to show in the editor, it has
        //       to be registered from code that runs in edit mode.
        InputSystem.RegisterBindingComposite<CustomComposite>();
    }
solar pivot
#

is there a way to use toggle crouch/toggle sprint instead of a continues sprint/crouch when i press the keys i assigned

light silo
solar pivot
#

Coroutine?

austere grotto
#

I think he misread you typing "continues" as "coroutine"

#

and I think you meant "continuous"

sullen lintel
#

ops yeah crusty morning eyes @austere grotto

tame oracle
#

i bough the ash vehicle physics, his car works when i just drag and drop it into the scene
i made got a kart model from sketchfab and used his script to setup the car physics
but i guess there's something wrong with the controls
if you look closely

#

the steering works on the gray kart but nothing else
i can drive the red car tho

#

i'm pretty new to this so i'm trying to reverse engineer what i see

vapid heart
#

hi is there any other ways to share data between files without using get or add component?
bc im using TMPro and 2 object using same file will error out.
any help?

austere grotto
#

Off topic

crimson crater
#

So last year i made a rebinding system with the input manager, i can make it work with the Input system but idk if it's any good compared to the regular ways to do it.
It basically stores the keys as strings (in a file) and convert them back to a key then stores that into the variable used to check for input

rich beacon
#

Is there any more "correct" way of implementing this ?

#
        private void Start()
        {
            InputActions.Gameplay.LeftButton.performed += ctx => LeftButtonPressed(ctx);
            InputActions.Gameplay.RightButton.performed += ctx => RightButtonPressed(ctx);
            InputActions.Gameplay.UpButton.performed += ctx => UpButtonPressed(ctx);
            InputActions.Gameplay.DownButton.performed += ctx => DownButtonPressed(ctx);

            InputActions.Gameplay.LeftButton.canceled += ctx => LeftButtonReleased(ctx);
            InputActions.Gameplay.RightButton.canceled += ctx => RightButtonReleased(ctx);
            InputActions.Gameplay.UpButton.canceled += ctx => UpButtonReleased(ctx);
            InputActions.Gameplay.DownButton.canceled += ctx => DownButtonReleased(ctx);
        }

#

I just want to notify when the left button was pressed and when it was released and so on

#

Code for the methods is this one and it's the same for all of them

#
        private void UpButtonPressed(InputAction.CallbackContext context)
        {
            OnDirectionPressed?.Invoke(Vector2.up);
        }
        private void UpButtonReleased(InputAction.CallbackContext ctx)
        {
            OnDirectionReleased?.Invoke(Vector2.up);
        }

#

(the context may be ignored since i was testing some stuff and forgor to delet it)

jagged wyvern
#

better to use it in an update function

rich beacon
#

wym

jagged wyvern
#

in update you do
if(inputactions.gameplay.upbutton.waspressedthisframe())

#

{

#

}

#

or you could use the event method with a composite type input

jagged wyvern
#

whichever suits you

zinc stump
#

@jagged wyvern They are using New Input System

jagged wyvern
#

i know?

zinc stump
#

You subscribe to events you don't need to run anything in Update

jagged wyvern
#

it's still an option

#

much less complicated

#

not like there's only one way to use the input system

#

😂

zinc stump
#

Yes, it is very flexible. But even if it supports backward method of using it, doesn't meant that you have to use it.

jagged wyvern
#

that's why I said whichever suits you

#

💁

true umbra
#

hello I'm new here
I'm gonna straight forward
is there any purchasable asset on store
to make a simple inputfield on Unity that later on stored on mysql database as just a string text raw data (on a certain column)

austere grotto
#

No

#

You will need to connect those things yourself

#

It's much too bespoke of a thing to have an asset for

vital river
#

Hi,
Can someone explain me why we should use the new Unity Input System instead of the Old Unity Input System. Moreover we have to code less in old unity input system and we can customize that too.

austere grotto
#

highlights of the new input system IMO are:

  • Runtime rebinding support
  • Support for event-based input handling
  • Enhanced Local multiplayer support
#

if you don't need that stuff, or have figured out ways to do that stuff in the old system, more power to you.

marble flare
#

Working with non-xbox/non-xinput controllers with the old system is... messy, to say the least.

forest oak
#

so i'm using the InputSystem.
and i want to dynamically change the input for an action (eg: MAP.ACTION).
eg some code would look like:

CONTROLL_OBJECT.MAP.ACTION.listenForAction();

basically this code would be the same as opening the Action Editor > MAP > ACTION > binding > path > listen
(CONTROLL_OBJECT is the cs class generated by the InputSystem.)

#

example use:
a controls tab in the settings menu so you can change your control scheme.

#

does this make sense?

blissful lotus
#
    {
        var rebindOperation = actionToRebind
            .PerformInteractiveRebinding().Start();
    }``` should work, I think?
forest oak
blissful lotus
forest oak
#

no

blissful lotus
# forest oak no

🤔 InputActions CONTROLL_OBJECT = new InputActions(); CONTROLL_OBJECT.MyMap.MyAction.PerformInteractiveRebinding().Start();

forest oak
#

https://youtu.be/p-3S73MaDP8?t=379 (CONTROLL_OBJCET is what the video says PlayerControlls)

Let’s set up Gamepad controls using the new Unity Input System!

► SIGN UP FOR JASON'S UNITY COURSES: https://game.courses/mastery-course-brackeys-bonus/?ref=21

👕Check out our merch! https://lineofcode.io/

♥ Support Brackeys on Patreon: http://patreon.com/brackeys/

·············································································...

▶ Play video
blissful lotus
#

But of course, remember to enable it.

forest oak
#

?

blissful lotus
#
CONTROLL_OBJECT.Enable();  CONTROLL_OBJECT.MyMap.Enable();
            CONTROLL_OBJECT.MyMap.MyAction.PerformInteractiveRebinding().Start();```
forest oak
#

ok

#

is there a way to see if an action is currently "active"?

#

eg: i have current code that uses float x = Input.GetAxis('Horizontal'); inside update()

#

eg: new code would look like: float x = CTRL.Map.Right.ReadValue() - CTRL.Map.Left.ReadValue();

blissful lotus
#

EDIT: I get you.

#

@forest oak Yes, you check the value of InputAction.phase, which essentially controls whether an action is in use. The values are as follows:

  • Started: same as GetButtonDown()
  • Performed: same as GetButton()
  • Cancelled: same as GetButtonUp().

To get the values, you need to use ReadValue<T>() like this:
T myvalue = InputAction.ReadValue<T>(); where T is the type relevant to what you are trying to read.

#

For instance: float x = CTRL.Map.Right.ReadValue<float>() - CTRL.Map.Left.ReadValue<float>();, assuming that Right is set up as a single axis.

forest oak
#

so a joys tic action would be type Vector2?

blissful lotus
forest oak
#

but i guess you can make specific axis?

blissful lotus
#

Ugh yeah, you can configure that in the UI if you want to create an axis with binary bindings (like keyboard keys). Actually, if A and D are fully left and fully right, then that's the way to do it.

forest oak
#

nice

paper meteor
#

how can I detect when a gamepad's joystick is reset to its default position? moving it moves my player, but when I stop moving the joystick it does not set the movement to 0

forest oak
#

i got you

#

Let’s set up Gamepad controls using the new Unity Input System!

► SIGN UP FOR JASON'S UNITY COURSES: https://game.courses/mastery-course-brackeys-bonus/?ref=21

👕Check out our merch! https://lineofcode.io/

♥ Support Brackeys on Patreon: http://patreon.com/brackeys/

·············································································...

▶ Play video
paper meteor
forest oak
#

can i use a wii-mote with the Input System?

#

(on desktop)

forest oak
#

i mean; is it possible to connect a wii-mote (via Bluetooth, on pc) with unity

#

@blissful lotus do you know if that is possible?

blissful lotus
forest oak
#

ah ok

forest oak
#

i keep seeing these "gamecube controller usb adapters" for pc

zealous tangle
#

Vector3 state;
bool success = controller.TryGetFeatureValue( CommonUsages.deviceAngularAcceleration, out state );
anyone know why this return 0,0,0?

I got oculus quest 2. rotation and other properties are working.,

#

what setup is required?

zealous tangle
#

figured it out

#

have to set it here:

#

then here:

zealous tangle
#

ok nvm its still zero, not sure what im doing lol

barren dust
#

I have an Input Actions set up, and the very simple script below to test. My WASD controls and my gamepad controls are both set to Pass Through Vector2 > 2D Vector Digital Normalized. However, when I play my game the gamepad controls work, but the WASD controls don't. I will also post a pic of my Player Input component.
`public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float moveSpeed = 10f;
private Vector2 _moveVector;

private void FixedUpdate()
{
    Move();
}

private void OnMovement(InputValue value)
{
    _moveVector = value.Get<Vector2>();
}

private void Move()
{
    transform.Translate(new Vector3(_moveVector.x, _moveVector.y, 0f) * moveSpeed * Time.deltaTime);
}

}`

#

Can anyone tell me why the WASD controls don't function?

austere grotto
#

Try value/vector2

spark flume
#

hi guys, how do you go about shooting in semi auto or in full auto with the new input system? Thanks!

twilit siren
#

Do you guys use the old default input system or the new one (with the component)?
Can you explain why?

austere grotto
austere grotto
twilit siren
austere grotto
#

PlayerInput is one of many ways to use the new system

twilit siren
barren dust
# austere grotto why'd you make it a pass through?

This seems to have solved the issue, so thank you. I have to admit I don't understand why though. My understanding is that pass through is the same as value, except that it triggers regardless of the input type and doesn't do an initial state check. Am I missing something?

austere grotto
barren dust
#

Bizarre! Thanks again.

weak night
#

Hey! I'm not a dev, but have a question about inputs in unity for a game I play.

In the game you can left click to move an item, or shift + left click to move a stack of items. On a controller, you can only press A to move one item.

Is there something limiting the devs from assigning the shift modifier to another button (left trigger, for example)? Shift has no other use in the game.

austere grotto
leaden sapphire
#

is there a way to have the browser ignore ctrl+F ?

#

it brings up the find/search text tool

austere grotto
leaden sapphire
#

hmm

quartz tinsel
#

from unity? unlikely

leaden sapphire
#

thanks

quartz tinsel
#

if you have access to the html file you can add a javascript with ```js
window.addEventListener("keydown", e=>{
if (e.ctrlKey && e.key == "f") e.preventDefault();
})

leaden sapphire
#

it worked

forest oak
#

does a TI-Nspire work with the input system?

austere grotto
forest oak
#

aww

austere grotto
#

Also what the heck is that, what happened to TI-84's

forest oak
austere grotto
#

I'm sure it has some limited support for "generic usb device"

forest oak
#

so i made my action with these values:

#

but how do i actualy add W for +1 and S for -1

austere grotto
forest oak
#

k

austere grotto
#

composite binding

forest oak
#

?

austere grotto
#

add a composite binding to the Action

forest oak
#

witch one

austere grotto
#

positive/negative binding

forest oak
#

k

#

so.
Input.GetAxis(...) what is the range of this function?

austere grotto
forest oak
#

Horizontal and vertical

austere grotto
#

-1 and 1

#

that's the old system though

forest oak
#

i pressed genorate cs class
i got this:

#

wdim?

#

@austere grotto ?

austere grotto
#

Delete the old generated class

forest oak
#

the old one what?

austere grotto
#

generated class file

forest oak
#

what can i use instead of Input.GetAxis("Mouse X") (this is old)

austere grotto
#

depends what strategy you're using to process input

#

there are many ways in the new system

forest oak
#

i have this:

#

how do i make the binding for the mouse?

twilit siren
forest oak
#

YES

austere grotto
twilit siren
#

Then read that first

forest oak
twilit siren
# forest oak what is `delta`?

If you really want to understand the basis of it, read that, and you'll be able to understand most of it and to pretty much anything if you read actively (which means reading and trying to understand, not just dumb reading)

austere grotto
forest oak
#

that is what i want

#

instead of having all these functions for each class that uses input:

using UnityEngine;
using UnityEngine.InputSystem;

public class NAME: MonoBehaviour
{
    InputControls controls;

    void Awake() {
        controls = new InputControls();
    }
    void OnEnable() {
        controls.WANTED.Enable();
    }
    void OnDisable() {
        controls.WANTED.Disable();
    }
}

what should i do?

#

eg; rn i have a:

  1. PlayerController.cs that uses controls.PlayerControls
  2. CameraController.cs that uses controls.CameraControls
forest oak
#

@austere grotto ?

#

understand

austere grotto
#

Did you ask a question?

forest oak
#

what should i do?

austere grotto
#

all what functions

forest oak
#

i guess not functions.
this:

InputControls controls;
void Awake() {
  controls = new InputControls();
}
void OnEnable() {
  controls.WANTED.Enable();
}
void OnDisable() {
  controls.WANTED.Disable();
}
austere grotto
#

Awake, OnEnable OnDisable?

forest oak
austere grotto
#

I mean if you want to just have one instance of InputControls you could make a script that sort of centrally manages it

#

make it a singleton

forest oak
#

i have two (there will be more) scripts that use input. i don't want to have to do all that code over and over for each class that uses it

austere grotto
#

Hence what I just said...

forest oak
# austere grotto I mean if you want to just have one instance of InputControls you could make a s...

so it would be like this:
INPUT.cs ```cs
...
class INPUT {
public InputControls controls;

void Awake() {
    controls = new InputControls();
}
void OnEnable() {
    controls.PlayerControls.Enable();
    controls.CameraControls.Enable();
}
void OnDisable() {
    controls.PlayerControls.Disable();
    controls.CameraControls.Disable();
}

}

`PlayerController.cs` ```cs
...
class PlayerController {
  public INPUT;
  ...
}

```?
#

i would rename INPUT to something else

austere grotto
#

nah make it a singleton

forest oak
#

singleton?

austere grotto
#

Google "unity singleton"

#

lots of explanations/implementations

forest oak
#

i'll look

#

singleton pattern?

#

i found a video.

#

the first 2 mins are him yelling at how painful they are

austere grotto
#

Seems like a bad video

#

Honestly I don't get using videos but

#

I guess I'm old

forest oak
#

i don't understand

austere grotto
#

I'm saying I don't think videos are the best medium for learning programming skills

forest oak
#

then link me a doc or smth

#

PS. i moved all the old code to the new system

#

what type is a MAP in the cs?

forest oak
#

does anintendo wii classic controller work?

forest oak
#

???

twilit siren
#

Chill man people sleep sometimes

twilit siren
#

Is there any way to work around that? Or it is what it is for now and we can't differentiate SHIFT+A and A, at all?

#

Oh nevermind seems like it's fixed in 1.4

tepid stag
#

Dont know if this is the right place, but my flythrough mode for the scene view just stopped working. Any fixes?

#

I cant work on my game like this

twilit siren
tepid stag
#

No sir, but thats a good suggestion

#

Ill check it out later, thank you very much :)** **

twilit siren
twilit siren
#

Can I use SendMessages and Invoke Unity Events behaviours in the same project? Or do I have to choose 1 early in the project and stick to it?

(if I understood correctly I can use SendMessages and BroadcastMessages together, but Unity Events uses a different way to get input datas so I wonder if you can combine)

tepid stag
#

Okay the problem solved itself, it started working again after 5 minutes

twilit siren
tepid stag
#

I have no idea lol

#

Ty for the help tho :)** **

twilit siren
#

Is it normal that Visual Studio never autocompletes my Input functions?
For example if I try to type OnMove, it'll always auto-correct to OnAnimatorMove

#

(I regenerated project files with Registry Packages checked, several times, and Input System namespace is already added)

twilit siren
austere grotto
#

These are just based on your input action names right? VS doesn't know anything about that

#

Now if you were to use the interface from the generated C# class, that would get autocorrect.

twilit siren
#

I spent the last 3 days reading and watching tutorials about the Input System, and the last 20 minutes reading official Unity manuals on it

#

Conclusion is that Unity tutorials suck, it lacks the most basic explanations about it

forest oak
#

CONTROLS.MAP.ACTION.??? action is of type Button. how do i get a true/false value of if it is down?

forest oak
#

@austere grotto
?

twilit siren
forest oak
#
error CS1061: 'InputAction' does not contain a definition for 'isPressed' and no accessible extension method 'isPressed' accepting a first argument of type 'InputAction' could be found (are you missing a using directive or an assembly reference?)
#

i also want when it's released

ivory sand
#

Is the Stick Deadzone - Processor not working with anyone else?

Not a problem as I end up writing my own code for it, which works.

            //Prevent picking up jitter from controllers.
            if (value.ReadValue<Vector2>().magnitude > 0.25f)
            {
                Debug.Log(value.ReadValue<Vector2>());
            }```

But still curious why it doesn't work. 🤔
forest oak
cerulean rain
#

Hello I got a quick general question for everyone. I am a beginner when it comes to Unity. So when it comes to the "New input system" vs the "old". The new seems more convenient once understood, but seems to have a steeper learning curve. I'm still unsure which to use especially when it comes to mobile development (touchscreen). Touchscreen seems to be in a realm of its own when it comes to input category. Any suggestions or advice ?

forest oak
#

here is my script:

using UnityEngine;

public class Interface: MonoBehaviour
{
    public Controls controls;

    void open() {
        if (controls.controls.Interface.Open.IsPressed()) {
            float r = transform.rotation.y;
            Debug.Log(r);
        }
    }
}

but it doesn't log anything

#

🤦

#

😮‍💨

#

i never call open

still sphinx
#

Hello everyone! For the life of me I cannot figure out why my player won't look at my mouse. It always keeps resetting it's rotation to -90 on the y axis.

#

Here is my relevant code and Input System settings

sturdy zephyr
#

I cannot for the life of me find a way to specify action(s) in the editor.
Is it hidden behind some obscure attribute? 🤔
I just need to randomly select from a few specified by the designer.

Edit: NVM I'm dumb. InputActionReference is what I need.

austere grotto
still sphinx
#

What do you mean?

austere grotto
#

I mean if you call ScreenToWorldPoint with a perspective camera and any Vector3 with a z value of 0, you will just get the camera's world position out

twilit siren
#

I'm confused, I just looked at several ways to make the Input System work, and it seems like it can work listening to Unity Events, C# Events, etc, being attached to a game object.
But it seems like it also work being attached to.. Nothing? Then why would I attach my Input Actions to a game object?

austere grotto
twilit siren
austere grotto
#

There's too many ways to list them all and provide an exhaustive list and it's not really worthwhile to do so

#

Find a way you like

twilit siren
#

I already struggle understanding how the whole thing works, but I realized I'm just getting very confused by different sources of knowledge that all use a different method

austere grotto
#

and use it

#

The basic concept is that you have some Input Actions that can be used to read input in various ways, and you use that to get input data into your code.

twilit siren
#

Yeah okay, that is understood

#

But how do you choose one way? Like I wouldn't want to pick a random one and figure out it's not what I needed

#

Documentation regarding Input System is still a bit confusing for a new comers imo haha, just spent 3 days melting my brain trying to understand how all that works

austere grotto
#

I'm not really sure what to say

#

try a few

#

see which you like best

#

and go with it

#

you'll learn more as you see more and get more experience with it

twilit siren
#

Well I don't care, that's the issue, cause I'm not advanced enough to understand the real differences

#

I guess I'll just go with the "basic" way of not using the component, cause I don't really know what it changes anyways

twilit siren
austere grotto
#

so I'm not sure how to answer that

#

But no probably not

#

Invoke C# events is a very misunderstood mode on PlayerInput

twilit siren
#

Input System is a very misunderstood tool to me, at all LUL

#

I thought the CallbackContext was for Invoke Unity Events

#

Well

austere grotto
#

It is used in many places for many things

twilit siren
twilit siren
austere grotto
#

Learned a lot from documentation, experimentation, and experience.

twilit siren
#

I just need somewhere to start and keep myself working on this one thing

austere grotto
#

It's kind of hard for me to make a recommendation because things that feel easy for me are hard to use for beginners. Probably PlayerInput with SendMessages/BroadcastMessages is the simplest way to do things.

#

Because you don't really have to hook things up much

twilit siren
#

Hm ok I'll try to find something on that, thanks!

#

But tomorrow, I spent 8 hours a day for the last 3 days only working on understanding the Input System

#

Just viewing dozens of docs and videos, each of them doing things a different way

#

Exhausting x)

austere grotto
#

In my personal projects I usually skip the PlayerInput component and use InputActionReferences all over the place

twilit siren
twilit siren
austere grotto
#

they're a bit limited

#

but for a simple platformer you should be fine

#

they're easy and quick to set up and use

twilit siren
#

Hm okay, but I wouldn't want to learn a method that would limit me for another more complicated game, I think that if I have to put the time in understanding a method, it'll take time no matter what, so I might better use that time learning a method that'll be enough on its own and not limit me, you see what I mean

austere grotto
#

Well I wouldn't be afraid of learning multiple methods, and understanding the strengths, weaknesses, and nuances of each

twilit siren
#

True, but I'd like to understand fully one method first

#

I mean, I'd love to learn multiple etc, but I found no documentation or video regarding the technical differences, weaknesses, strength etc, comparing them, and my programming skills are waaay too low for me to figure that out by myself in less that 6 months (and I'm being kind with myself, I'd say over a year if I'm realistic, from the point I am now)

austere grotto
#

Honestly if your programming skills are not great, is there a reason you insist on the new system, which has arguably a higher barrier for entry? The old system is still there, works fine, and is much more friendly to lower skilled programmers

#

I think if you are a beginner programmer, try to stick to PlayerInput in either SendMessages/Broadcast Messages mode OR Invoke Unity Events mode

twilit siren
austere grotto
#

Those two are probably the most beginner friendly ways of using the system

twilit siren
#

I feel like Invoke Unity Events mode is the most complete one, maybe a bit less than Invoke C#, but easier and still complete, while SendMessages looks limited

austere grotto
#

Another pretty beginner friendly way is to directly define input actions on your script and read them in Update sort of like the old system:

public InputAction JumpAction;
public InputAction MoveAction;

void Update() {
  if (JumpAction.WasPressedThisFrame()) {
    //jump
  }

  Vector2 moveInput = MoveAction.ReadValue<Vector2>();
  transform.Translate(moveInput * speed * Time.deltaTime);
}```
twilit siren
austere grotto
#

you start to get an idea of what Input Actions can do

#

and if you want you can also easily do something event-based with the same approach

#

e.g.

public InputAction JumpAction;

void OnEnable() {
  JumpAction.performed += JumpListener;
}

void JumpListener(InputAction.CallbackContext ctx) {
  // do the jump
}
#

This is all very self contained

#

you define the bindings and the actions right on your script in the inspector

#

and a bunch of these skills (dealing with InputAction and CallbackContext) will carry over into many other modes of using the system too

twilit siren
#

Okay that sound pretty straight forward explained that way haha

#

So I just put my action in JumpListener function? And where do I attach the Input Actions Control file? In the Player Input component added to my character?

#

I'm not even sure about that cause I've seen a guy adding it to an empty object, and then calling for the player's component in the Events list like that (screen), and then calling for the event in the "No Function" list

#

I didn't really understand that method tho, since I thought Player Input had to go on the Player, thus it confused me regarding the Events itself and how to use it haha

#

But I'll find someone who explains how to use Invoke Unity Events, the basic way x)

burnt moth
#

Could someone help me convert my project from old input system to the new input system

twilit siren
austere grotto
#

you just define the Input Action directly in the inspector

twilit siren
twilit siren
#

So I think I'm done with what I wanted to do, but since I wrote this code reading and watching a bunch of different sources, I'd like to make sure I don't start with bad habits, so if anyone could check and tell me if it's fine or not, would be very appreciated!
(I used the new Input System, with C# Events)

https://paste.ofcode.org/7KAsdpEEM6tguxZWT2dvaa

heady river
#

hi im using the new input system to transition between an idle animation and a walking animation and my idle animation simply plays on repeat. The issue is with the "GetKey.w" im aware thats not the correct statement and want to replace it with the correct one however i have been looking at the documentation and i cant get this to work.

sullen lintel
# heady river hi im using the new input system to transition between an idle animation and a w...
using UnityEngine;
using UnityEngine.InputSystem;
public class IdleWalk : MonoBehaviour
{
    Animator animator;
    private void Awake()
    {
        animator = GetComponent<Animator>();
    }
    private void Update()
    {
        if (animator == null) return;

        if (Keyboard.current.wKey.wasPressedThisFrame)
        {
            animator.SetBool("walk", true);
        }
        if (Keyboard.current.wKey.wasReleasedThisFrame)
        {
            animator.SetBool("walk", false);
        }
    }
}
heady river
sullen lintel
heady river
hexed pelican
#

Hello I'm working on a small makeshift inventory system. I don't understand what I'm doing wrong I keep getting an error saying "Input Button f is not setup". I did set it up in the input manger that's why I'm confused and a little stuck. If anyone could help it would be appreciated

code- https://paste.ofcode.org/8NjKLvukRNf6ZhWeDUPW53

Error ScreenShot- https://prnt.sc/Yz86mcSxpm17

Input Manager ScreenShot- https://prnt.sc/udeq-e4ZnTIg

Lightshot

Captured with Lightshot

Lightshot

Captured with Lightshot

flat blaze
#

I think that's caused by the UI, from memory I think if you click on "Event settings" and the inspector should have a button to fix it

hexed pelican
#

sorry where would the event settings be?

flat blaze
#

Hierarchy

#

I think it's called event settings, it's something from the UI

hexed pelican
#

Oh ok

#

I see it

#

Would you know what it is to fix it?

flat blaze
#

Image from google

hexed pelican
#

oh I don't even have that button

#

thanks though

glass yacht
#

it uses the f key as one of it's inputs

heady river
#

for reference this is my animator

hexed pelican
sullen lintel
twilit siren
#

Hey, I've been told that I should have my input management in a script, and the physics in another script, so that my Input System is more modular. But I can't find a reliable and well-explained way to do this.

I'm wondering if that guy was right or not, and if yes, how could I do that? I just can't find how to use Unity Events behavior with the inputs and the physics in separate scripts

stiff siren
austere grotto
#

see if that helps

#

if not, show your code

stiff siren
fleet pasture
#

I am trying to make something happen after pressing a controller trigger and then releasing it. (I'm using the old input system) With how controller triggers are set up they are considered axis (like a joystick) due to being analogue. Because of this I've only managed to make it so that when you press it something happens but you can hold down the trigger and I don't want that. (For reference to make something happen I'm just doing this: if(Input.GetAxisRaw("Grapple") > 0.5) do something) is there a way to treat a trigger like any other button and use something like Input.GetButtonDown?

austere grotto
#

you can also go into the axis settings and modify where the "activation point" is

#

(not sure it's called that)

hazy jetty
sudden lagoon
#

Anyone have tips how to solve problem when input system UI input module overwrites some of player input data. If I enable and disable input system ui input module it starts to work again. but I dislike that kind of workaround

#

it seems having seperate InputActions solves this problem. Does having multiple files for InputActions have any negatives ?

#

instead of having one with two action maps?

wet vortex
#

I'm getting two events per axis event, one for start and one for ending. How can I ignore the end event?

#

I've already tried setting the interaction type to "Press only"

#

oh well i just wont use an axis

austere grotto
#

don't use the press only interaction

wet vortex
wet vortex
austere grotto
#

that will also hurt though yes

wet vortex
twilit siren
#

How can I change this rb.velocity = new Vector2(moveDirection, 0) * speed; to work with a 1D Axis?
Cause atm I'm setting Y to 0 and it's breaking gravity and my jump :v

#

(moveDirection being a float taking the left and right inputs)

twilit siren
#

I'm pretty sure there's something simple built-in to work with 1D Axis, but I still can't find it!

Replacing = with += worked but now my character's just lightning fast and feels like on an icefloor, so I'm not sure this is the right solution since it'd need a bunch of extra work to keep it from sliding and being that fast

#

If anyone has the same issue, I finally found a fix: rb.velocity = new Vector2(moveDirection * speed, rb.velocity.y); 😄

dusty rapids
#

Movement works fine , but this random errors pops us and option change action maps disappears from the left. How to fix this ?

icy condor
#

I bumped up the resolution of my game and now all the buttons are broken. Any ideas?

austere grotto
slow cape
#

Hello, I have the following code in a FixedUpdate method:

if (Input.GetButton("SpeedControl"))
        {
            float currentAxisSpeed = Input.GetAxis("SpeedControl");
            Debug.Log("SpeedControl Down: "+currentAxisSpeed.ToString());
        }
#

Here is a configuration of SpeedControl axis:

#

The problem is - keypress is getting registered multiple times

#

5-6 times I get 'SpeedControl Down' notification

austere grotto
#

GetKey returns true every frame while the key is held down

slow cape
#

How do I configure numbers to be less sensitive on keypress?

austere grotto
#

What are you trying to actually do

slow cape
#

I want to increase/decrease some internal counter on pressing F1 and F2

#

Decrease on F1, increase on F2, as defined in Axis setting

#

Gravity, Dead and Sensitive settings are confusing

austere grotto
#

unless you want it to continuously increase as you hold it down

#

in which case you want:

float myCounter;
void Update() {
  myCounter += Input.GetAxisRaw("SpeedControl") * Time.deltaTime;
}```
slow cape
#

second option feels better for me, since you can potentially redeclare keys for Axis later

#

A user may, potentially, I think

austere grotto
#

also users cannot rebind axes in the old input system

slow cape
#

sad

#

so, do I need big or small values in axis configuration - Gravity and Sensitivity - to "dumb down" axis?

austere grotto
#

you really can ignore all of that stuff

#

for the code I shared above

#

it doesn't matter

#

that's only for when you use GetAxis which has sort of a "momentum" to it

slow cape
#
float currentAxisSpeed = Input.GetAxisRaw("SpeedControl") * Time.fixedDeltaTime;
        if (currentAxisSpeed!=0)
        {
            
            Debug.Log("SpeedControl Down: "+currentAxisSpeed.ToString());
        }
#

too fast for me...

#

actually, I may smack in a multiplier

#

but still...

austere grotto
#

yes that is what you need to do

slow cape
#

guess there is no other way 😔

austere grotto
#

it's not a mystery

#

make a multiplier value and it will represent "speed" expressed in units per second

safe cargo
#

Hello Guys, I'm curious about how can I get full float value in Unity new Input system, I mean if I press button halfway, it will return the value of 0.5 or -0.5.

#

currently, I get the value (1, 0) (0,0 )(-1, 0)

austere grotto
#

keyboards don't report half presses

safe cargo
#

ah, okay

#

Thank you, let me take a look

#

Wait, so if I want to make a movement, which binding should I use

austere grotto
#

whatever binding you want to use to move with

safe cargo
#

I mean if there any input usage for keyboard to return the value I just mentioned?🤣

austere grotto
#

no

#

there's no way to detect if a keyboard key is half pressed

#

it's either pressed or it isn't

safe cargo
#

Alright, thanks bro

urban tide
#

Does anyone know the Input System equivalent of GetKeyDown and GetKeyUp?

austere grotto
#

It's better to use input actions though...

dusty rapids
#

How do i fix this error ?

#

please help i have no idea whats happening

quiet thistle
#

idk if my raycasting is acting up

for this inventory that is behind my pause menu, it contains 8 buttons (the white and image ones)
so if I turn on raycasting for all these inventory buttons, the pause menu buttons can't be pressed on areas where the inventory button is behind it.

and if I turn off raycasting, the inventory buttons won't work

Also any buttons behind the pause menu seems to be interacting too

And if there'stext behind the canvas, it doen't work also

urban tide
#
    private Touch mytouch;
    private Touch nullTouch;
    private int cameraControlAreaTouchId;

private void Start()
{

        cameraControlAreaTouchId = -1;
        Input.multiTouchEnabled = true;
        nullTouch = default(Touch);
}

private void Update()
{
foreach (Touch touch in Input.touches)
        {
            if (touch.phase == TouchPhase.Began && cameraControlAreaTouchId == -1 && touch.position.x >= (float)(Screen.width / 2))
            {
                cameraControlAreaTouchId = touch.fingerId;
                mytouch = touch;
            }
            if (touch.phase == TouchPhase.Moved && touch.fingerId == cameraControlAreaTouchId)
            {
                mytouch = touch;
            }
            if (touch.phase == TouchPhase.Ended && touch.fingerId == cameraControlAreaTouchId)
            {
                cameraControlAreaTouchId = -1;
                mytouch = nullTouch;
            }
            if (touch.phase == TouchPhase.Stationary && touch.position.x >= (float)(Screen.width / 2))
            {
                mytouch = nullTouch;
            }
        }
}```
#

How do I port this to the new input system

urban tide
#

touch input seems really confusing on the new input system than the old one

echo ember
#

can someone help me understand why my code isn't working as intended?

#

(rb is the Rigidbody initialized earlier)

#

it should be adding a force forward if W is pressed, adding a force backward if S is pressed, rotating left if A is pressed, and rotating right if D is pressed

#

but for some reason, only the A key works properly

#

(D just keeps rotating in the same direction as A, and W and S don't have any effect at all)

#

Note: I would prefer to use transform.translate and transform.rotate, but I have found that these are like “teleportation” and thus override any collision mechanisms. As a result, even with colliders and rigid bodies, my objects are not colliding properly when I use transform like this

#

But if there is a way to collide them properly even that transform, I’d be glad to use them instead

austere grotto
#

Also AddForce/AddTorque are extremely different beasts from Translate/Rotate

#

You should use MovePosition/MoveRotation if you want it to behave similarly to that

olive mortar
#

is there a way to detect what controller is connected / in use?
Xbox360 /XboxOne / PS4 etc

sullen lintel
olive mortar
#

string currentDeviceRawPath = playerInput.devices[0].ToString(); im gonna see what this debugs

sullen lintel
olive mortar
#

i dont have any other controller to test if its right or not lol

#

i only have the keybaord and an xbox one controller

#
        foreach(var foo in input.devices)
        {
            var bar = foo.displayName;
            Debug.Log("Device Name: " + bar);
        }```
sullen lintel
olive mortar
#

i mean sure, xbox controller, but xbox one controller would be good

#

and if i were to use an xbox 360 controller, was hoping it'd show that

#

i might need to buy a ps4 controller to check

sullen lintel
#

so I guess it can be changed in the JSON

olive mortar
#

Ooo, need to look into haptics too, that could be fun

glass timber
#

I deleted this out of Beginner and moved it to here, didn't realize there was an input system chat.

I'm pretty new at learning the new Unity Input system and right now I'm just trying to do a simple Raycast Shooting using the input system. I have it set up to shoot on left mouse click

This is the script on the gun:

    public void Shoot()
    {
        RaycastHit hit;
        if(Physics.Raycast(cam.position, cam.forward, out hit, range))
        {
            print(hit.collider.name);
        }
    }

This is the script on the Input Manager:

    private void Awake()
    {
        playerInput = new PlayerInput();
        onFoot = playerInput.OnFoot;

        motor = GetComponent<PlayerMotor>();
        look = GetComponent<PlayerLook>();
        gun = GetComponent<Gun>();

        onFoot.Jump.performed += ctx => motor.Jump();
        onFoot.Crouch.performed += ctx => motor.Crouch();
        onFoot.Sprint.performed += ctx => motor.Sprint();

        onFoot.Shoot.performed += _ => gun.Shoot();
    }

When I press left click I get a null reference exception error, not sure what's causing it. All the other actions such as crouching and sprinting work.

spark pumice
glass timber
#

Yeah it's telling me the NRE is the line that says

onFoot.Shoot.performed += _ => gun.Shoot();
#

But it's stumping me as to why

spark pumice
#

well, onFoot, onFoot.Shoot, and gun are the three things to check on that line

glass timber
#

so onFoot is the player input which is made automatically when I save correct?

spark pumice
glass timber
#

Oh I'm not saying something is there haha

#

I'm just not sure what's missing. You want me to debug log those three things? Is that what you're saying?

spark pumice
#

yes

glass timber
#

Gotcha. One min

#

uhm, I think I'm slightly confused on how to debug that. normally I can Debug.Log a raycast by checking what it's hitting etc. But I'm not sure how to debug log the NRE line I sent above:

onFoot.Shoot.performed += _ => gun.Shoot();
spark pumice
#
Debug.Log(onFoot);
Debug.Log(onFhoot.Shoot);
Debug.Log(gun);
glass timber
#

ah

#

Well now I feel dumb lol

spark pumice
#

don't beat yourself up. Learning is a process

glass timber
#

The gun is null

spark pumice
#

alright, so where did you think you were setting gun? And why did that fail?

glass timber
#

So I had the gun set up here I believe:

gun = GetComponent<Gun>();
#

Which is inside the Awake

spark pumice
#

yep

glass timber
#

I also tried just making it Serialized and dragging it but it's still null

#

I'm not really sure why it failed though to be honest

spark pumice
#

can you screenshot your inspector?

glass timber
#

Of the input manager section?

spark pumice
#

the whole object, if possible

#

multiple screenshots is fine

glass timber
#

You're wanting what the gun should be attached to though correct?

#

That whole inspector

spark pumice
#

whatever object this script we're looking at is on

glass timber
#

That's it

spark pumice
glass timber
#

I can check

spark pumice
#

maybe its null on one of them but not the one we're looking at?

glass timber
#

I don't see it on anything else

spark pumice
#

oh, you know what, when you set it in the inspector, did you comment out the GetComponent line?

glass timber
#

I don't think so. Let me try that

#

I'd rather get it from that line though tbh

#

But I can check at least.

spark pumice
#

sure, I just want to confirm that that line is the problem and not that we're looking at the wrong object

glass timber
#

So yeah now that's working

spark pumice
#

okay, good

#

so, GetComponet looks through all of the components on this object and finds one of the right type and returns that

glass timber
#

wait

spark pumice
#

but this object doesn't have a component of type Gun

glass timber
#

If it's in a child I need to look in child right

#

Let me try that

#

Yeah now it's working lol.

#

I hate when I mess one simple line up

spark pumice
#

haha yep

#

me too

#

but now you're familiar with this issue

glass timber
#

I appreciate it!

spark pumice
#

so fixing it next time should be fast and easy

hollow eagle
#

Hi! I've installed the Starter Assets Pack to use controllers on Desktop and Mobile. Everything works great except that on Mobile, the Look Joystick is linked also to all the screen so when we use the Left Joystick to control the character, the camera moves also. How can I change that to be able to use only the Right Joystick to look around?

echo ember
echo ember
#

Using this code, I can get the object to move and rotate, but all of the movement is unfortunately relative to global coordinates

#

how can I move relative to local coordinates?

#

it seems like all the results I find on Google are for transform.translate (or something like it), which doesn't work for me because then I can't collide

#

nevermind! just got it working 😄

hollow eagle
#

Nobody to help me to check some settings..??

hollow eagle
#

I found that is when I add an Input controller to the Freelook camera, the whole screen can be use to look around. If I deactivate this setting it's okay but now the Right Joystick doesn't work at all...

hollow eagle
#

If I uncheck this setting, the camera movement stops on the whole mobile screen

#

and on the UI_Virtual_Joystick_Look GameObject I have this

#

@green sun any thoughts ?

green sun
#

Lemme look what u sended

#

Maybe make a code for looking around should work

hollow eagle
green sun
#

I can send u a code maybe tommorow

#

Wont be perfect tho

#

Wil have alot of issues

#

Vus i mainly dk keyboard

hollow eagle
#

for now I think I will just deactivate the input provider.. we have to launch the project tomorrow. They will not be able to look around for now but at least it's less annoying than having a camera who rotates all the time

green sun
hollow eagle
# green sun Have u added a camera lock to ur code

It's the Asset from Unity, the Starter Assets Pack. The only issue I had with it, was the VirtualCamera. the look around Joystick was too fast on mobile so I decided to change for the Freelook camera. I like it better but not for mobile to control the look around Joystick. Finally, I used the Virtual Camera again and I find the settings to be less fast to control. It's different a little bit for the view but for now, it will be okay.

heady lagoon
#

I'm currently mapping out a gamecube controller using a mayflash adapter in the new input system, but the C-stick behaves weirdly. Unity only recognizes the X and Y axis of the controller, and only outputs positive values, so only right and down work. In the Input Debugger Unity does recognize that the x and y axis go into the negatives but I cant seem to replicate that in any way through code or mapping. I tried setting the control types as axis, didnt work. Vector2 did not work either. Anyone have any ideas?

sly frost
#

how can i check that a device is connected or not... For e.g : i only want to play haptics if controller is connected.

olive mortar
#

How can i get what controller im using?

With an xbox one controller it debugs: "Xbox Controller"
with a ps4 controller it debugs "Wireless Controller"
mouse is mouse, keyboard is keyboard.

I want to find out the platform controller being used. so if im using a ps4 controller, i want to know that its a playstation controller.

    public void OnDeviceChanged(PlayerInput input)
    {
        UsingGamePad = !input.devices[0].device.name.Equals("Keyboard");
        //Debug.Log(input.devices[0].device.name);
        foreach(var foo in input.devices)
        {
            var bar = foo.displayName;
            Debug.Log("Device Name: " + bar);
        }
    }```
#

this is debugged when doing var bar = foo.name instead.

#

unless whats being shown is correct?

rugged plinth
#

Does anyone know why the new input system is throwing this exception?
This is the first time I'm attempting some more complex button behaviour and I found this solution on this post
https://forum.unity.com/threads/having-multitap-interaction-issues.859300/
So if you know of a better way please let me know

 
        private void OnEnable()
        {
            PlayerCommons.InputMappings.Interactions.Inventory.actionMap.actionTriggered += QuickCheckInventoryAction_performed;
        }

        private void OnDisable()
        {
            PlayerCommons.InputMappings.Interactions.Inventory.actionMap.actionTriggered -= QuickCheckInventoryAction_performed;
        }

        private void QuickCheckInventoryAction_performed(UnityEngine.InputSystem.InputAction.CallbackContext obj)
        {
            if (!obj.performed)
                return;

            if (obj.interaction is MultiTapInteraction mti)
            {
                Debug.Log("Checking quick");
                return;
            }

            if (obj.interaction is PressInteraction pi)
            {
                Debug.Log("Open Inventory");
            }
        }```
steady walrus
#

hmm i dont understand how u can specify inputs for 2 different pads, since the buttons overlap, for example i have to delete buttons relevant to ps pad in order to get xbox pad working correctly, and vice versa

#

am i being dumb here?

#

for example on ps square is 0, and on xbox A is zero, both in different places

blissful comet
#

If a game is menu-based, meant to be controlled entirely through clicks/taps, there's no need to use the Input System, right?

#

Or are there any benefits to it over using the standard input module and event system?

upper lance
#

how would you implement unique key for actions in a map?

austere grotto
#

what kind of actions

upper lance
#

ie player movements, you wouldn't want the same bind for different actions when rebind

eternal current
#

Hello everyone! I'm learning about the new input system, watched some videos already, but I'm trying to understand how can I get the Input(Touch) from my cellphone and then destroy the object that it touches?.

queen cape
#

Hey guys, can anyone help me with Buttons on Android? I'm using the New Input System but want to have seamless swapping between movement buttons
For example if you hold the right button here, without releasing your finger off it, it will remain pushed, is it possible to drag your finger off of it and activate the left? What part of the component is responsible for that?

merry parrot
#

The Input System UI Input Module processes the pointer for gamepads as well.
PointerType is None, but it still does raycasts at screen position (0, 0) which leads to my UI element in the bottom left screen corner always being hovered while using a gamepad.

That is surely an oversight, no?

Sadly I can't override any of the methods, because they are not virtual.

#

There is a workaround I just found, basically using infinitely large numbers as the "Pointer" for gamepads. But this feels very janky.

austere grotto
merry parrot
austere grotto
#

weird I've never run into this issue

merry parrot
#

Yea, I've never had an interactable UI element at the bottom left corner, but now I do

#

the raycast at the bottom should not happen if pointerType == PointerType.None

#

This is from the InputSystemUIInputModule class.

austere grotto
#

I'll take your word for it - submit a bug!

merry parrot
#

I will!

lyric vigil
#

Can you implement dual joy-con local multiplayer for nintendo switch?

#

like this thing

ashen ivy
#

So I have a q for anyone who has used the new input system in production. Today we tried to plug in a generic gamepad. The system recognized it as a joystick. We had to create a custom class and a struct with explicit byte layouts according to the raw HID data. The docs say that using the InteractiveRebind is better for generic controllers. How ever without our custom struct the listen for input option in the binding menu doesnt even work. So.... WTF ?

desert mauve
#

For some reason this script isnt changing my inputs, the most it's doing is, changing my text to what i clicked, so it knows what im clicking, but not mapping it to my input system. http://pastie.org/p/3jaGDE7kcnxgDk8dYsN45D

eternal current
# austere grotto IPointerEnterHandler

Okay, I tried to use this but I didn't get so far, I'm still with difficult to destroy the gameObject when I click/touch on it... Is there something similliar to OnMouseDown() that I can use in a different way on the new input system? A more beginner friendly way

austere grotto
eternal current
#

But do I need to add something beyond the IPointerDownHandler to it works?

eternal current
#

Another thing that I didn't get it.. normally when you create a public method you can use from here for example:

But when I try to use the OnPointClicker Method in the sameway that is on the documentation I can't acess it through here

#

this was the code that I was using.. but didn't work.. Is there anything that I'm forgetting or doing wrong?

#

I tried without the if statement too and it didn't work

spark pumice
#

or ones that match the signature of the UnityEvent, which will then show up in the dynamic section the menu (which your screenshot doesn't have since nothing matches)

austere grotto
austere grotto
heady river
sullen lintel
# heady river

You still didn’t figure it out ? Fyi the transitions are the white arrows..

heady river