kingBook

导航

UnityEditor 查找和获取内置资源

Object[] UnityAssets = AssetDatabase.LoadAllAssetsAtPath("Resources/unity_builtin_extra");
foreach (var asset in UnityAssets) {
    Debug.Log(asset);
}

Debug.Log("===================================");
Debug.Log(Shader.Find("Sprites/Default"));

var mat1 = AssetDatabase.GetBuiltinExtraResource<Material>("Sprites-Default.mat");
Debug.Log($"mat1:{mat1}");

posted on 2022-08-26 12:22  kingBook  阅读(173)  评论(0编辑  收藏  举报