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
Angius7mo ago
Uh Did you try just instantiating a Vector2 Instead of using tuples?
41phaNum3r1ca1
41phaNum3r1ca1OP7mo ago
upon trying to explicity convert
No description
41phaNum3r1ca1
41phaNum3r1ca1OP7mo ago
I have no idea what does that mean?
Angius
Angius7mo 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
41phaNum3r1ca1OP7mo ago
no, I am assigning these two values to a preexisiting Vector2
Angius
Angius7mo ago
Then do that
41phaNum3r1ca1
41phaNum3r1ca1OP7mo ago
the Vector2 is contained in a different script
Angius
Angius7mo ago
existing.X = newX;
existing.Y = newY;
existing.X = newX;
existing.Y = newY;
41phaNum3r1ca1
41phaNum3r1ca1OP7mo ago
oh I just forgot to put new
Want results from more Discord servers?
Add your server