Search code examples
c#unity-game-enginereferenceusing

Unity update 5.4.1 assembly reference bugs


I just updated my unity to 5.4.1. I can play normally in the engine itself, but when i build my game i get errors like these:

The type or namespace name `NetworkBehaviour' could not be found. Are you missing a using directive or an assembly reference?

The type or namespace name UI' does not exist in the namespace UnityEngine'. Are you missing an assembly reference?

The type or namespace name `IPointerUpHandler' could not be found. Are you missing a using directive or an assembly reference?

and there are lot of them, as you can see most of them are from standard assets.

all using directives are in scripts. I dont know what to do. i think it's bug maybe? and now i should wait to next update? any help will be appreciated.


Solution

  • I used to have the same problem, I fixed it with Assets -> Reimport All

    Edit: It is a well know Issue of Unity, if that doesn´t work, try deleting the Library\UnityAssemblies folder. After restarting Unity, the folder will appear and probably will fix your problem.