This question was
closed Nov 23, 2017 at 12:07 PM by
Cranks17 for the following reason:
Other
Question by
Cranks17 · Nov 23, 2017 at 10:30 AM ·
c#errorvector2referencingactionscript
Using a reference for another script in a method issue.
Hello.
So basically the moment I'm trying to convert some ACS3 code to C# in Unity.
This is the method i have in one of my scripts that's throwing back an error. ORC is the script I'm trying to reference however, its not letting me convert the point variables to a vector.
public void SetCursors(ORC point1, ORC point2, ORC point3)
{
a = Vector2Int.Distance(point1,point2) + 0.000000001;
b = Vector2Int.Distance(point2,point3);
c = Vector2Int.Distance(point3,point1) - 0.000000001;
}
In the class I'm trying to reference i have this set as my constructor. So basically im trying to convert an int called x/y to a vector in the other class.
public ORC(int x, int y, int id = -1)
{
_id = id;
}
Comment
Follow this Question
Related Questions
[C#] The left-hand side of an assignment must be a variable, a property or an indexer 0 Answers
Unity 5 doesn't detect some positions in Vector3 0 Answers
Referencing Base Class In Prefab 0 Answers
The Built [exe] of my game won't go past Splash Screen 0 Answers
Visual Studio 2015 keeps crashing... 1 Answer