Search Unity

Unity 2017 editor sometimes doesn`t scan changed script.

Discussion in 'Editor & General Support' started by Lagnas, Jul 21, 2017.

  1. Lagnas

    Lagnas

    Joined:
    Apr 27, 2014
    Posts:
    18
    I modified my script, but the editor doesn`t scan.

    For example, I add new public variable in TestScript.cs. But editor didn`t know that.
    So, editor run without any changings. Few minute after, editor renewal changings.

    My Unity is 2017.1.0f3. Why this? maybe bug?
     
  2. catimus

    catimus

    Joined:
    Sep 9, 2015
    Posts:
    43
    i'm having the same issue
    it can take ages for a new variable or change in a script to appear in unity, even though it says it has been compiled.
     
  3. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I came to the forum to report the same issue. The strange part, when I click on the script file, I see the real code on Inspector. But it doesn't work in the game.

    I guess I could solve it by re-importing the cs file, but that's a quite ugly solution.
     
  4. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Curious if you are using .NET 4.6? I am and have dependencies on that so it's hard to switch back to 3.5 to see if it's a 4.6 specific issue.

    Code compilation in general is hosed right now on 2017 with 4.6 enabled. Unity does a bunch of caching and obviously that logic is screwed up. Plus I get frequent access violations when rebuilding from the mono Garbage collector.

    I'm betting that bringing in 4.6 caused changes to their compilation flow generally, it would almost have to. That's the only reason I can think of why 2017 out of the blue started having code caching/compilation issues.
     
  5. koplavilppu

    koplavilppu

    Joined:
    Feb 19, 2015
    Posts:
    3