Search Unity

Combining DLL projects and Asset Store purchases?

Discussion in 'Scripting' started by sballew7, Jun 11, 2016.

  1. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Hey all,

    I am in the process of refactoring my codebase into multiple VS projects, and including the resulting DLLs in my Unity project. A decent writeup on this process is here.

    My question is on how to handle asset store items within my code-only projects.

    For a specific case, consider the following situation:
    • The project has the following projects:
      • MyGameCompany.Common (Class Library)
      • MyGameCompany.GameOneCode (Class Library)
      • GameOneUnity (A unity project)
    • The project uses an asset. For example, NodeCanvas.
    • Many code files in MyGameCompany.Common would want to implement Nodes and Conditions for use in NodeCanvas, and these could be ported to any game project.
    Right now, NodeCanvas (and all of its code) exists in the GameOneUnity project, since it was downloaded straight from the Asset Store. So here are the options I see:
    1. Pull out NodeCanvas source into the MyGameCompany.Common project.
    2. Create a MyGameCompany.External project, which will contain any code from external assets. The DLL from this is referenced by MyGameCompany.Common.
    3. Similar to #2, create a new Unity project for common external assets. Use the DLL produced by the Unity build, and have MyGameCompany.Common reference it.
    In any of the above cases, my guess is that importing Asset Store items into new game projects would entail importing, and then deleting any code files, and instead rely on the DLL version.

    I personally am leaning towards #3, as my ExternalAssets Unity project should make it easy to import and update assets, and produce a DLL that I can reference from MyGameCompany.Common. To prevent breaking script references, the DLL would only be used when building MyGameCompany.Common, and the Unity game project would need to include the asset source in the project.

    Does anyone have thoughts or experiences on this? Any insight is appreciated. Thanks!
     
  2. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    No suggestions? I know it's not very common for unity developers to create code libraries, and people usually drop everything straight into the unity project, but my compilation times are getting out of hand.