Открывает ассет с соответствующим приложением.
Opens asset in an external editor, texture application or modelling tool depending on what type of asset it is.
If it is a text file, lineNumber
and columnNumber
instructs the text editor to go to that line and column.
Returns true if asset opened successfully.
using UnityEditor; using UnityEngine;
public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Manually Check Textures")] static void OpenAssetExample() { for (var i = 0; i < 10; i++) { var texturePath = AssetDatabase.LoadMainAssetAtPath($"Assets/Textures/GroundTexture{i}.jpg"); if(!EditorUtility.DisplayDialog($"Open next texture", $"Open GroundTexture{i}.jpg texture?", "Yes", "Cancel")) break; AssetDatabase.OpenAsset(texturePath); } } }
Открывает ассет(ы) с соответствующим приложением(ми).
Opens asset in an external editor, texture application or modelling tool depending on what type of asset it is. Returns true if all assets opened successfully.