Skip to content

Instantly share code, notes, and snippets.

@baba-s
Created December 9, 2019 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baba-s/bc81d68f106883a78808b75b01a4552a to your computer and use it in GitHub Desktop.
Save baba-s/bc81d68f106883a78808b75b01a4552a to your computer and use it in GitHub Desktop.
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