Search Unity

Assembly being compiled in wrong phase

Discussion in 'Editor & General Support' started by opsive, Mar 29, 2014.

  1. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Hello,

    I have a dll file that I am trying to compile in the standard CSharp-Assembly-Editor assembly. In this case the dll is called BehaviorDesignerEditor and I placed it in the Behavior Designer/Editor folder.

    $compile.PNG

    Based off of the script execution order, it looks like it should be compiled in phase 4 because it is not in Standard Assets/Editor, Pro Standard Assets/Editor or Plugins/Editor. However, based off of the log, it looks like it is being compiled during phase 2 which isn't good because it references objects from phase 3 (Assembly-CSharp):

    I've placed the relevant text in bold. I know that the BehaviorDesignerEditor assembly compiles fine because this error only occurs when I have another script within the Plugins/Editor folder. Am I looking at the log correctly? How come BehaviorDesignerEditor isn't waiting to be compiled?

    Thanks for any help or pointers,
    Justin
     
    Last edited: Mar 29, 2014
  2. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I have field a bug report for this, case 599473.
     
  3. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    @opsive did you get any feedback? did you manage to resolve this issue?
     
  4. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Unfortunately I didn't. 599473 is still open and hasn't been looked at.

    I worked around it by placing the runtime files in the Plugins folder so they get compiled in Phase 1. Ideally I'd like to be able to place the files in a non-Plugins folder but this has worked well enough.
     
  5. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    I've had a somewhat similar issue today, I'm not sure if my solution will help, but might give you ideas how to approach similar issues in the future if you ever come across one. http://answers.unity3d.com/questions/925380/circular-references-between-dlls-firstpass-and-a-g.html