Scripting Error

Updated on July 12, 2017 in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
7 on July 12, 2017

I am on Episode 5 of “How to make a Video Game in Unity” And whenever I type in the code that allows the console to tell you the specific object that you collided with (Timestamp- 4.20), I am greeted with this error message http://imgur.com/a/fYorU This is my first time attempt using Unity so I have no clue what I’ve done wrong. Any help would be greatly appreciated.

  • Liked by
Reply
6 on July 12, 2017

Ok, when you read error message closely it says: UnityEngine.Component.collider is obsolete. This means that this property is not going to be maintained by Unity anymore and you should change it to: GetComponent<Collider>()

So what you need to do is go to Collision.cs script, find all the lines using Component.collider and replace Component.collider text with GetComponent<Collider>().

 

on July 12, 2017

Thanks! Any idea why Brackeys’ code didn’t work for me, as it worked in the video?

on July 12, 2017

I didn’t follow the video, but looking at error I would assume it was made with earlier version of Unity.

It would be impossible task for Brackeys’ to update all tutorials to work with all the latest versions but this is why we Q&A forums 🙂

on July 12, 2017

Sorry to bother you again but I’m now getting this message, with a yellow warning sign next to it.

“The referenced script on this Behaviour (Game Object ‘Player’) is missing!”

 

on July 12, 2017

Apparently some script is missing. I found this solution on Unity forums: http://answers.unity3d.com/questions/282419/the-referenced-script-on-this-behaviour-is-missing-1.html

Wise
on July 12, 2017

If you have a new question please start a new thread.

on July 12, 2017

Sorry, I’m new to this.

 

 

Show more replies
  • Liked by
Reply
Cancel