Created
December 9, 2019 01:27
-
-
Save baba-s/bc81d68f106883a78808b75b01a4552a to your computer and use it in GitHub Desktop.
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
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
public static class GUIDExporter | |
{ | |
[MenuItem( "Tools/Export GUID" )] | |
private static void Export() | |
{ | |
var list = AssetDatabase.GetAllAssetPaths() | |
.Select( c => new { Path = c, Guid = AssetDatabase.AssetPathToGUID( c ) } ) | |
.OrderBy( c => c.Path ) | |
.Select( c => $"{c.Path},{c.Guid}" ) | |
.ToArray() | |
; | |
var result = string.Join( "\n", list ); | |
Debug.Log( result ); | |
EditorGUIUtility.systemCopyBuffer = result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment