Our project has suffered a weird bug
when we using foreach or for loop in editor script
it crashed after Unity compile in editor
though the code doesn’t been run at all
here’s some clues:
1.sometime even if the loop is empty(suffered 1 time by using “for”)
2.but much chance to happen by foreach(always, but a rare time it don’t happend)
3.it will happen only in editor script
4.editor log shows some LoadTypeException
5.using Unity 5.6.0p3, but tested in 2017.2, still suffered
6.tried clear library folder beside Assets folder
7.tried to reimport all
8.not only that script, but also any editor script using foreach or for
9.the other script that have for or foreach will not make it crash, only happend when adding new loop
10.the logic of added new loop is similar to others, very simple use of loop
that’s all
we have search about 2~3 days on this weird issue, if it can’t be solve, we can’t continue on our project
please help, thanks