- Home /
Why isnt my script working? Trying to get an error to pop up
Ive been trying to script and error to popup in the console when i play the game, and when it detects there is no Rigidbody2D component, but i cant seem to get it to pop up. Ive been following this tutorial on skillshare: https://www.skillshare.com/classes/Unity-2D-Game-Development-Course/1490867236/classroom/discussions
Im on course 8. Setting Up The Ship at minute 10.10 Any thoughts?
Im using unity 2019.3.7f1 Personal and using Visual Studio 2017 for the script,
Script pictures and unity pictures: https://gyazo.com/4358181ac80a719d15bc2f5e5c67b7df https://gyazo.com/a66db5fa775bb491520b9661df637d22
Answer by Namey5 · Mar 30, 2020 at 05:47 AM
Have you saved the changes you've made to the script? From the looks of it, the editor hasn't recompiled the script yet, so make sure so save the file before testing. If it still won't compile, you can right-click the file in the editor and hit 'reimport'.