Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Why two Assembly Csharp

Discussion in 'Scripting' started by AnandSG, Jan 29, 2020.

  1. AnandSG

    AnandSG

    Joined:
    Oct 5, 2018
    Posts:
    9
    when we create a unity project it creates 2 Assemblies , one is Assembly-csharp ,and another is Assembly-csharp-player.
    the thing is the DLL i created is compiling/its shows available for assembly-csharp-player , so i can use dll functionality but not for assembly-csharp.
    and unity uses assembly csharp while compiling scripts ...
    Any idea why so ???
     
  2. Sttifer

    Sttifer

    Joined:
    Dec 5, 2017
    Posts:
    6
    I have the same question.
     
  3. shinichikudo997

    shinichikudo997

    Joined:
    Jul 1, 2018
    Posts:
    32
    1 year and no answer?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Have you checked google about those files? You would be amazed!

    https://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html

    Since the "-player" suffixed file is not mentioned, I presume something has an asmdef, as explained in the above link, or else the engine has changed since the above documentation (today) reads for 2019.4.

    Beyond that, drop the DLLs into a dot-net-peeker and see what's inside if you're curious.

    Otherwise if there is no actual problem it sounds a little bit like asking why your car has four cylinders instead of three.
     
  5. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    576
    Didnt answer the question tho, just rambling.
     
    pandolfini likes this.
  6. crossyfootball

    crossyfootball

    Joined:
    Sep 15, 2015
    Posts:
    3
    We're having this same issue. Building for UWP, there are somehow 2 assemblies. We didn't (intentionally) create the second assembly "Assembly-csharp-player". Where did this come from? Some scripts are compiling under it and we can't get references to those. We've never seen this happen before, why now? using Unity 2019.3.7f1
     
  7. Bunny83

    Bunny83

    Joined:
    Oct 18, 2010
    Posts:
    3,573
    Kurt-Dekker likes this.
  8. crossyfootball

    crossyfootball

    Joined:
    Sep 15, 2015
    Posts:
    3

    Already tried that, and it doesn't work for me. That link says to
    I don't have any option to "cancel the selection of Player projects". I am using Unity 2019.3.7f1


    upload
     
  9. Bunny83

    Bunny83

    Joined:
    Oct 18, 2010
    Posts:
    3,573
    I don't have a 2019.3.x install on my machine but I have a 2019.4.19f1 installation and it looks like this on my machine:
     
    GameRocker likes this.