Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can you ignore it?

Discussion in 'Scripting' started by WishPotato, Jul 11, 2014.

  1. WishPotato

    WishPotato

    Joined:
    Jul 8, 2014
    Posts:
    4
    As many might have met the error: "The referenced script on this Behaviour is missing!"
    can it effect your game, in anykind of way which can ruin the game, or not let you "ship" it?
     
  2. Ereous

    Ereous

    Joined:
    Aug 29, 2012
    Posts:
    163
    You should just remove the components from the objects. Then the error will no longer exist.
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    But to answer your question, no, it won't cause any actual problems. Worst it could do is slow your game down ever so slightly. Mostly, it just clutters up your Console.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    It's a warning, not an error. Errors (red) must be fixed, warnings (yellow) can be ignored, but should be fixed. Especially in this case, where there's no reason not to fix it.

    --Eric
     
  5. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    Well, usually. Sometimes errors don't matter either....
     
  6. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Like the random Unity editor GUI errors? :p

    I've stopped reporting them and now just hit clear.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    I am, of course, referring to errors caused by the user...you can't even enter play mode until they're fixed, so it's pretty mandatory....

    --Eric
     
  8. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    That's only compile time errors. Runtime errors are quite different, and their impact on how things go can vary quite a bit.

    Here's a curly one: at work on Friday one of the designers asked me to look into an error he was getting. Things were working as expected, but the error kept showing up in specific cases. I looked into it and fixed the error, and the program completely freaked out. The error had been stopping a script from executing, but because it had already put itself in a valid state nothing bad actually happened as a result. As soon as I "fixed"* it the script could then execute but, because it was now executing with obviously dodgy data (which hadn't been documented appropriately) it now behaved incorrectly and yet didn't throw an error.

    * The clear answer here is that I didn't actually fix it. From a user perspective, though, I did indeed fix the problem that the error message pointed me at. Unfortunately it was a symptom of a higher level problem that wasn't being detected at all...