📅  最后修改于: 2022-03-11 14:48:44.086000             🧑  作者: Mango
public class CharacterList
{
List characterList = new List();
void PopulateList()
{
string[] assetNames = AssetDatabase.FindAssets("Your_Filter", new[] { "Assets/YourFolder" });
characterList.Clear();
foreach (string SOName in assetNames)
{
var SOpath = AssetDatabase.GUIDToAssetPath(SOName);
var character = AssetDatabase.LoadAssetAtPath(SOpath);
characterList.Add(character);
}
}
}