This repository has been archived by the owner on Jan 22, 2022. It is now read-only.
Changing a constant in one class doesn't recompile other classes that reference it #81
Labels
Milestone
Describe the bug in detail:
If you make one class reference a constant in another class, and then only change the other class, the first class will have a stale value until you force it to recompile.
Provide steps/code to reproduce the bug:
Enter play mode, and note that the console says
6
. Exit play mode.Edit
ConstHaver
and change itsmyVal
value to 5.Enter play mode, and note that the console still says
6
. Exit play mode.Edit
ConstPrinter
and addDebug.Log("hi");
on a new line after the existing Debug.LogEnter play mode, and note that the console now says
10
(and thenhi
).Expected behavior:
I expected that either the constants would either be set at runtime, or changing one would cause all of the scripts that reference it to be recompiled (or that the readme would warn about this behaviour).
The text was updated successfully, but these errors were encountered: