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!
Can we see the code you are using?
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.
It's works! Thanks! :D
just forgot, the problem was the class name...
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
Script error: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(System.Type)' was found
script gets this error: (6,20): BCE0023: No appropriate version of 'UnityEngine.Object.Instantiate' for the argument list '(UnityEngine.Transform, System.Object)' was found.
sound on button press error + its firing when space is pressed
Broken Script Help
Not expecting void Start