I just started learning how to use Unity to make a simple 3D game.
It's working fine when it comes to creating the environment, but once I imported the built-in Character package it gave me a compiler error and wouldn't run (All compiler errors have to be fixed before you can enter playmode!).
Removing the imported package removes the error and it can run, I tried using other built-in packages like 2D or Cameras but same problem occurred.
After adding 2D package, here's the console (error with no text):
After adding a character from the package, here's what the Inspector says (the associated script cannot be loaded. please fix all compiler errors and assign a valid script):
As shown in the pictures I'm using unity 5.6.0f3 64-bit.
I tried uninstalling and re-downloading it again but that didn't work.
I tried creating a new empty project, import a package and hit run, still didn't work.
-
It seems the two scripts on the character are not supported in Unity3D 5.6.0f3. Doesn't the console window show any compile error?– zwcloudApr 14, 2017 at 1:10
-
You are importing a 2D character into a 3D game..– HristoApr 14, 2017 at 6:17
-
@zwcloud no more additional errors, just the one in the first picture with no text which was already there before adding the character.– Ibraheem TuffahaApr 14, 2017 at 7:45
-
Did you download the package from the asset store? What's the link to the asset?– zwcloudApr 14, 2017 at 7:48
-
@Hristo I was trying different packages, Same thing happens when you have an empty run-able project but you import the built-in Character package, it gives an empty compiler error as well like in pic 1.. then if you add a First Person Character for example you get the same message script message shown earlier in pic 2 in the Inspector for the "First Person Controller (Script).. I tried adding more pictures to the post but it wouldn't let me add more than 2 since I need more reputations.– Ibraheem TuffahaApr 14, 2017 at 7:49
1 Answer
A working solution from this post.
Hi, I reported this as a bug and I just got the response from Unity today. Try changing system locale to not Arabic. Go to Control Panel > Change date, time or number format> Administrative tab> Change system locale
Check if the script file name is the same as the class name in the file? They should be the same.

UPDATE
See this part of the picture.

No Monobehaviour scripts in the file, or the names do not match the file name.
And from here,
MonoBehaviours inside namespaces break, if they have a method with a default parameter (such as public void Foo(bool bar=true)).
See also here.
And it seems an identical issue of Compile Error with empty message.
Solution from the post:
Could get a Error message on another computer and it's the same as mentioned in this Thread: Creating managed DLL for Unity fails with error when importing into Unity
Which lead to this: http://forum.unity3d.com/threads/5-2-1p3-mono-cecil-assemblyresolutionexception-unityengine-ui-dll.361666/
I could actually solve it with manually deleting all remains of Unity and Monodevelop after the deinstallation (ex. C:\Users[YourUserName]\AppData\Local etc. ) and then reinstalling 5.2.3f.
-
-
Unfortunately that didn't work, is there something else that I must have installed along Unity so the compiler would work? Apr 14, 2017 at 10:33
-
Does the script file name is the same as the class name in the file?– zwcloudApr 14, 2017 at 10:35
-
I'm sorry but I'm new to Unity, but do you mean this? ibb.co/iHC3fk (I hope I'm allowed to add external links in stackoverflow) Apr 14, 2017 at 10:45
-
2I found the solution on this comment here (Third link you posted): answers.unity3d.com/comments/1340655/view.html "Hi, I reported this as a bug and I just got the response from Unity today. Try changing system locale to not Arabic Go to Control Panel > Change date, time or number format> Administrative tab> Change system locale This solved the problem for me." Which I changed system locale from Arabic (Jordan) to English (United States). Not sure why this causes a bug but I'm glad it's finally gone! @zwcloud Thanks a lot for your help. Apr 14, 2017 at 14:27
