I am trying to convert Unity UnityScript to C#. I am getting this error:
Assets/Scripts/BoostPlatformCheck.cs(40,36): error CS0019: Operator
==' cannot be applied to operands of type
int' and `object'
Here is the C# code:
int collidedWith = collisionInfo.gameObject.GHetInstanceID();
ArrayList collided = new ArrayList();
....
if(collidedWith == collided[collided.Count - i - 1])
{
alreadyExists = true;
return;
}
I changed Array to ArrayList and collided.length to collided.Count when I converted it from JS to C#.