Skip to content

Instantly share code, notes, and snippets.

View Josef212's full-sized avatar
:shipit:
Subidapdap

Josef21296 Josef212

:shipit:
Subidapdap
View GitHub Profile
public class Helper
{
public static List<T> FindAssetsByType<T>() where T : UnityEngine.Object
{
List<T> assets = new List<T>();
string[] guids = AssetDatabase.FindAssets(string.Format("t:{0}", typeof(T)));
for( int i = 0; i < guids.Length; i++ )
{
string assetPath = AssetDatabase.GUIDToAssetPath( guids[i] );