Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Common C# Editor and Game classes

Discussion in 'Scripting' started by Richard_B, Aug 8, 2006.

  1. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    Is it possible to share the same (non-monobehaviour) class between Editor scripts and Game scripts. I tried putting the common class in a few different folders but each time the "other" script complained it could't find the common class?

    thanks,
    Richard.
     
  2. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
  3. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    I hate it when the answer is in the manual! - sorry about that. I think the problem is that I am not recompiling the game scripts after changing the UnityEditor namespace script - will give it a try.

    thanks,
    Richard.
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    It's not about what you compile first. There is a predefined order in which scripts (Or groups of scripts to be accurate) are compiled and how their dependency is set up. You can all read that in the above document.