Returns the path name relative to the project folder where the asset is stored.
全てのパスはプロジェクトフォルダに対する相対指定とします。例えば "Assets/MyTextures/hello.png" です。
@MenuItem("GameObject/Create Material") static function CreateMaterial () { // Create a simple material asset var material = new Material (Shader.Find("Specular")); AssetDatabase.CreateAsset(material, "Assets/MyMaterial.mat"); // Print the path of the created asset Debug.Log(AssetDatabase.GetAssetPath(material)); }