Search Unity

Bug AssetDatabase.LoadAssetAtPath

Discussion in 'Asset Database' started by linfuqing, Nov 20, 2020.

  1. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    View attachment 739777
    See the pic,AssetDatabase.LoadAllAssetsAtPath have a value,but AssetDatabase.LoadAssetAtPath,UnityEditor.AssetDatabase.LoadMainAssetAtPath,AssetDatabase.LoadAllAssetRepresentationsAtPath return null.

    Is this a bug?

    my unity version:2020.1.7,2020.1.12,2020.1.14fc1
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    You don't show the full path you are using in the debugger watch window.

    We know the API works, we know there are examples in the documentation, have you compared the working example path to the path you using? What's different? Extension? Path? Presence of wonky characters?

    Always start from the data.