cant convert type (int, int) to Vector2

as shown, I am trying to convert these here integers into Vector 2 format. the activeTile variable is of the type Vector2
No description
9 Replies
Angius
Angius6mo ago
Uh Did you try just instantiating a Vector2 Instead of using tuples?
41phaNum3r1ca1
41phaNum3r1ca1OP6mo ago
upon trying to explicity convert
No description
41phaNum3r1ca1
41phaNum3r1ca1OP6mo ago
I have no idea what does that mean?
Angius
Angius6mo ago
new Vector2(x, y) usually new Foo() is how you create an instance of a Foo same is true for any class or struct
41phaNum3r1ca1
41phaNum3r1ca1OP6mo ago
no, I am assigning these two values to a preexisiting Vector2
Angius
Angius6mo ago
Then do that
41phaNum3r1ca1
41phaNum3r1ca1OP6mo ago
the Vector2 is contained in a different script
Angius
Angius6mo ago
existing.X = newX;
existing.Y = newY;
existing.X = newX;
existing.Y = newY;
41phaNum3r1ca1
41phaNum3r1ca1OP6mo ago
oh I just forgot to put new
Want results from more Discord servers?
Add your server