17 lines
		
	
	
		
			427 B
		
	
	
	
		
			C#
		
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			427 B
		
	
	
	
		
			C#
		
	
	
| 
								 | 
							
								namespace Guru.Editor
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    using UnityEditor;
							 | 
						||
| 
								 | 
							
								    public class GuruEditorHelper
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        public static string GetFilePath(string filter)
							 | 
						||
| 
								 | 
							
								        {
							 | 
						||
| 
								 | 
							
								            var guids = AssetDatabase.FindAssets(filter);
							 | 
						||
| 
								 | 
							
								            if (guids != null && guids.Length > 0)
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                var path = AssetDatabase.GUIDToAssetPath(guids[0]);
							 | 
						||
| 
								 | 
							
								                return path;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            return "";
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |