bas-boop / Feature-vault

This a Unity package with features, extenstions and tools. Ideal for integration into any Unity project.
MIT License
2 stars 0 forks source link

Unexpected usage of vector extensions. #5

Closed bas-boop closed 10 months ago

bas-boop commented 10 months ago

Describe the bug When using the vector extensions I expected to use the functions form the static class to change the vector that I'm calling it from.

To Reproduce Make a Vector2 or Vector3:

Vector3 testVector = new();

Call a change function. This will result in a vector that has the value (0, 0, 0)

testVector.ChangeX(2);

Work around:

testVector = testVector.ChangeX(2);

Expected behavior Is that I just call the function and it's already changed. This does apply to all other functions that suggest it changes the vector calling from it.

Vector3 testVector = new();
testVector.ChangeX(2); // returns (2, 0, 0)

Screenshots image image

What feature has a bug?