How to Make a Game error CS0012

Updated on June 6, 2018 in [A] Brackeys Courses
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on June 5, 2018

Hi there,

I am at the end of Brackeys tutorial on How to Make a Game. I am at the final episode, the part where the game is built and run. My game works perfectly when running it through Unity, the trouble is when I build the game, I get the following error:

Assets/Scripts/Score.cs(7,9): error CS0012: The type `UnityEngine.MonoBehaviour’ is defined in an assembly that is not referenced. Consider adding a reference to assembly `UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’

The error seems to target the deceleration of the score text in that c# file. I downloaded the finished game from the dev assets website to see if it was my personal error of some kind, but the finished game had the exact same error. Can someone please explain this error to me and how to fix it, any help would be greatly appreciated!

  • Liked by
Reply
0 on June 6, 2018

Try Reinstalling or Updating Unity. 
The issue is probably to do with your copy of Unity. So if updating Unity fails, try reinstalling it. 

Consider reading This Forum Etiquette Post  for a general outline on how best use the forums. So that you can make the most of it and its members.

  • Liked by
Reply
Cancel