Reputation: 1
'Component.GetComponent()' is a method, which is not valid in the given context this error in my code;
GetComponent().DOMove(finalPos,2f);
Upvotes: -1
Views: 40
Reputation: 379
Change
GetComponent().DOMove(finalPos,2f);
to
GetComponent<ComponentYouWantToGet>().DOMove(finalPos,2f);
Upvotes: 1