This file contains hidden or 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 UnityEngine; | |
using System.Collection.Generics; | |
using System.Linq; | |
public void LogAllResources() { | |
List<UnityEngine.Object> allResources = new List<UnityEngine.Object>(Resources.FindObjectsOfTypeAll(typeof(UnityEngine.Object))); | |
IEnumerable<string> allResourceNames = allResources.Select(x => x.name); | |
Debug.Log(allResourceNames.Count()); | |
Debug.Log(string.Join("\n", allResourceNames.ToArray())); | |
} |
実行するとログに全てのリソースの一覧が表示されますので、あとはそれっぽい名前のやつを適当に拝借すればOKです。