Created
February 21, 2017 16:26
-
-
Save ninpl/6a55b9fc1fa66cb664027d7b9f2c15f1 to your computer and use it in GitHub Desktop.
Herramienta para Unity3d. Clic derecho en un asset -> Copy Asset Path. - ideal para usar con AssetDatabase.LoadAssetAtPath <>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ┌∩┐(◣_◢)┌∩┐ | |
// \\ | |
// Singleton.cs (21/02/2017) \\ | |
// Autor: Antonio Mateo (Moon Pincho) \\ | |
// Descripcion: Herramienta para copiar la ruta \\ | |
// Fecha Mod: 21/02/2017 \\ | |
// Ultima Mod: Version inicial \\ | |
//******************************************************************************\\ | |
using UnityEngine; | |
using UnityEditor; | |
public static class CopyAssetPathContext | |
{ | |
[MenuItem("Assets/Copy Asset Path")] | |
public static void CopyAssetPath() | |
{ | |
if (Selection.activeObject != null) | |
{ | |
string assetPath = AssetDatabase.GetAssetPath(Selection.activeObject); | |
EditorGUIUtility.systemCopyBuffer = assetPath; | |
Debug.Log("Copiado en Buffer:" + assetPath); | |
} | |
else | |
{ | |
Debug.Log("Nada seleccionado."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment