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

Question How to File.WriteAllBytes() to Asset folder ?

Discussion in 'Asset Database' started by anthonov, Jul 22, 2022.

  1. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    Is there a shortcut to get the main asset path with AssetDataBase ? it only works with an asset but I just want the main asset path.
    Or do I need to use the full path from hd root ?
    By the way I'm very bad at paths in general, if you have some random knowledge to share let's go.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,028
  3. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    ahah thanks that was that! I got confused with Application.PersitentDataPath and I thought there were the same.