- Home /
Question by
Alexandre · Apr 25, 2011 at 07:19 PM ·
errorsyntax-errorbce0023
How "include" the Raycast?!
I'm learning Unity and I got this error...
Assets/RaycastHit.js(7,27): BCE0023: No appropriate version of 'UnityEngine.Physics.Raycast' for the argument list '(UnityEngine.Vector3, UnityEngine.Vector3, RaycastHit, int)' was found.
What I need to do to use the raycast!?
All the best!
Comment
Best Answer
Answer by Ben Holmes · Apr 25, 2011 at 07:22 PM
looks like you named your class RaycastHit which overrides the RaycastHit class in Unity. Physics.Raycast() doesn't know what to do with your class so it errors out. Rename your class as something else or use UnityEngine.RaycastHit when declaring your variable.