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

C# files from packages are not included in compilation

Discussion in 'Package Manager' started by stopiccot_tds, Oct 23, 2018.

  1. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    I'm testing local package feature in Unity 2018.3 beta.

    I've created testpackage folder with simple package.json file inside Packages folder.
    Then I've moved some auxiliary C# files from Asset/Plugins to Packages/testpackage/Plugins.
    It led to
    errors.
    Obviously that's because C# files from my package are not included in compilation.
    Is there any settings checkmark to include them?
     
  2. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
  3. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Thanks, next question. I'm checking whether I can move some editor postprocess scripts to package. I'm getting
    error. Are postproccess scripts supported to be working from packages?
     
  4. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
    Yes. They are. But I think you need to explicitly set a reference to the post-processing assembly from your own package assembly.
     
  5. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Ok, thanks again for fast reply. Sorry for annoyance but I have one more question.
    Is there any way to find assets from packages by calling AssetDatabase.FindAsset() ?
    Cause according to what I see in reflection data internal SearchFilter class is required for that
     
  6. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Ok, seems like FindAsset() was limited only to Assets folder in 2018.2, but 2018.3 fixed that