- Home /
Question by
beginner programmer · Mar 15, 2015 at 07:11 PM ·
unexpected
in script when I type rigidbody it says it was unexpected. Why?
Comment
Any chance of seeing that code? Could be anything, without seeing the code there's no way to say why.
Answer by Cherno · Mar 15, 2015 at 08:08 PM
It's possible that this is due to Unity 5's changes in the GetComponent function. Where as formerly you could use short words to access Unit-specific components like RigidBodies (rigidbody), now it HAS to be GetComponent().
Answer by tanoshimi · Mar 15, 2015 at 08:11 PM
Probably because
GetComponent<Rigidbody>()
was expected.
Your answer
Follow this Question
Related Questions
Rigidbodies leap up like fleas then ignore collisions! 0 Answers
Input string was not in the correct format 2 Answers
C# - Unity "this" is an unexpected symbol 1 Answer
Error in line (133,31) - Unexpected symbool private 1 Answer
Unexpected error 1 Answer