Search Unity

AssetDatabase.FindAssets not working for packages

Discussion in 'Package Manager' started by HG_SB, Jul 5, 2018.

  1. HG_SB

    HG_SB

    Joined:
    Dec 9, 2015
    Posts:
    20
    Code (CSharp):
    1. AssetDatabase.LoadAssetAtPath<Shader>("Packages/com.unity.probuilder/ProBuilder/Shader/DiffuseTextureBlend.shader");
    Works fine.

    Code (CSharp):
    1. AssetDatabase.FindAssets("", new string[] { "Packages/com.unity.probuilder/ProBuilder" });
    Returns an empty array.
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    527
  3. HG_SB

    HG_SB

    Joined:
    Dec 9, 2015
    Posts:
    20
    Hi @okcompute_unity,

    I have reported the bug. Case: 1056753
    I tested it with Unity 2018.1.2f1 and 2018.2.0b11

    Sebastian
     
  4. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    44
    @okcompute_unity Hey, I got the same error in 2019.1 with packages that got installed via the Git integration of the Package manager. Should I still create a bug report or is this already known?

    It can't seem to find the files as they reside under the Library/PackageCache folder...
     
  5. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    527
    spaceemotion likes this.