Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How do I know if an asset folder exists?

Discussion in 'Editor & General Support' started by JohnSonLi, Feb 10, 2015.

  1. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    I got AssetDatabase.CreateFolder(...)...
    but How do I know if a folder exists? anyway there is nothing like AssetDatabase.Exists(path).
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
  3. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
  4. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    Why are you reluctant to do it this way? It works exactly as expected.
     
  5. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    because I thought AssetDatabase would give me the perfect function.