- Home /
Question by
CB-TV · May 08, 2014 at 06:42 PM ·
collider2dboxcollider2dontriggerenter2d
BoxCollider error from C# to UnityScript
This line gives me an error:
((BoxCollider2D)collider).size.x;
saying that I need a ";" even though I already have one and also it doesn't know what "collider" means even though I've already defined it in the OnTriggerEnter2D function with:
function OnTriggerEnter2D (collider : Collider2D)
I think this may be a simple problem with me converting C# to UnityScript but I havn't found a solution anywhere even not on the Unity reference guide. Thanks for helping and reading if you do!
Comment
Is the line of code that gives the error inside the OnTriggerEnter2D function?
Your answer
Follow this Question
Related Questions
Unexpected token: collider? 1 Answer
Object is not colliding with wall colliders 0 Answers
How to move BoxCollider2D 1 Answer
OnTriggerEnter2D works without being actually triggered. 0 Answers