koha02
koha02

Reputation: 11

The code is not compiled in Unity. How to fix it?

When saving/running the script, Unity does not see any changes in the code. Changes to the code start working only after restarting Unity.

I have not found a solution to my problem. I have to restart UNITY every time so that the changes in the script work.

Previously, I just saved the script, the changes took effect without restarting Unity, immediately after compilation. Currently, compilation does not occur until Unity is restarted

Upvotes: 1

Views: 114

Answers (1)

Fattie
Fattie

Reputation: 12363

As you say, if you

  1. Type something in to any of the c# scripts
  2. Tap SAVE in the text editor
  3. Tap the usual "Run" button (triangle icon) in Unity

it should run straightaway, showing the changes.

Some possibilities,

  1. Are you using VSCode for text editing? In the real world it is the only usable option for Unity. (NOT VisualStudio .. VSCode.)

  2. Did you install the necessary plug in for VSCode? You mention it has previously worked normally, but, you never know.

  3. Did you add some simple log lines in the script, which, you should see on the console. (Maybe your changes just have some bug and you see no change.)

  4. Have you added any extensions or packages lately? They could be the issue.

Upvotes: 0

Related Questions