Search Unity

LoadAllAssetsAtPath doesn't work

Discussion in 'Scripting' started by DubStepMaster, Apr 4, 2013.

  1. DubStepMaster

    DubStepMaster

    Joined:
    Jul 17, 2012
    Posts:
    40
    hey there

    in my Projetct under

    |Assets
    ||TerrainEditor
    |||Editor
    ||||Texturen
    |||||Texturen

    is one Texture.


    Code (csharp):
    1. Object[] objsTex = AssetDatabase.LoadAllAssetsAtPath("Assets/TerrainEditor/Editor/Texturen/Texturen/");
    after this code is objsTex.Length = 0

    why?

    it should be one or not??
     
  2. Gibbonator

    Gibbonator

    Joined:
    Jul 27, 2012
    Posts:
    204
    I don't think the asset loading functions work with folders. You need to give it a path to an asset file.