There could be several reasons why Unity is not showing compile errors:
Editor Configuration: If your editor settings are configured incorrectly, Unity might fail to catch or display compile errors. This is particularly common when the scripting backend or API compatibility level is improperly set.
Integration Issue: Unity is supposed to be integrated with a code editor like Visual Studio or MonoDevelop. If there is an issue with this integration, you may not see the compilation errors where you're supposed to.
Script Compilation Order: In certain scenarios, when scripts are not compiled in the correct order, it can lead to Unity missing some of the compile errors.
Unity Console Failures: Another common cause of not seeing compile errors in Unity is due to issues with the Unity console itself. The console sometimes fails to refresh or update properly which means that it might not accurately reflect the true state of your project.
Consider the following solutions based on the above-mentioned causes:
Check Editor Settings: Go to "Edit > Project Settings > Editor", and ensure that your configurations match your coding needs. For example, if you are programming in C#, make sure the scripting backend is set to 'Mono' and the API compatibility level is set to '.NET 4.x'.
Re-establish Code Editor Integration: Navigate to "Edit > Preferences > External Tools" and make sure the correct editor is selected under "External Script Editor". If you recently updated or changed your code editor, you might need to reconfigure these settings.
Configure Script Compilation Order: To do this, go into "Edit > Project Settings > Script Execution Order" and ensure that everything is arranged correctly. If you have scripts that depend on each other, make sure they are executed in the correct order.
Refresh Unity Console: Try clearing the console and recompiling your scripts to refresh the console's error list. If this doesn't work, consider restarting Unity to fully refresh the program's state.
Remember to keep backups of your project before making widespread changes, so you can easily revert them if necessary.