Just a little question.

When reading Mouse input, everytime the ReadValue() is used.
But there is also a value. What are the differences between those two.
Is one performing beter then the other, or are they the same.

Hi There,
Looking at what is returned by Mouse.current.position, I see that it is a Vector2Control type. Where as Mouse.current.position.ReadValue() returns a Vector2.

We want the vector2 in this instance since that is what we are using in the ScreenPointToRay.

Vector2Control appears to be a vector of axis inputs. I guess it is something used by the Unity input system.


Yes, i know that. That is not what i ask.

From the Vector2Control, there a 2 possibilities and these are the ReadValue() method, or the value property.
What i was asking is, which one performs beter. or are they the same.

Greetings Bert.

Oh I see, good question.


This is a real mystery this one, the documentation doesn’t have anything, but I am looking in the file definitions. AND… Looks like they are identical. Sorry, I don’t have a better answer for you, I think they are the same.
There are a bunch of variants of readvalue that might offer other features, but this is just returning value.

Here is the full description:

Thank you for the answer.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms