trophy 0
May 2025 108 posts
Editor.EditorUtility.OpenFileDialog : api/Editor.EditorUtility/OpenFileDialog
trophy 0
Jun 2023 1 post
string file = EditorUtility.OpenFileDialog( "Select VMF file", "vmf", $"{Sandbox.Project.Current.GetAssetsPath()}/" );
string relPath = Path.GetRelativePath( $"{Sandbox.Project.Current.GetRootPath()}/Assets", file );

if ( !FileSystem.Mounted.FileExists( relPath ) )
{
	EditorUtility.DisplayDialog( "Import failed", $"'{file}' is not accessible!" );
	return;
}
Hacky solution to read file without using System.IO
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.