How to get project path in Unity3d
Some little code snippets to get filepaths in different situations
If you need a file path to specific asset you can use AssetDatabase class:
AssetDatabase.GetAssetOrScenePath(yourAsset);
If you need a file path to your project’s root path, you can use this:
System.IO.Directory.GetCurrentDirectory()
*this works in Editor scripts, such as your Editor Windows, or menus.
Понравилась статья? Поделиться с друзьями: